import type { Mat3, Mat3Like, Mat4Like, Vec3Like } from './types'; export type { Mat3, Mat3Like }; /** Create a Mat3 (default all zero; callers usually call identity() right after). */ export declare function create(): Mat3; /** Allocate a new Mat3 copy. */ export declare function clone(a: Mat3Like): Mat3; /** out = 3x3 identity (column-major [1,0,0, 0,1,0, 0,0,1]). Returns out. */ export declare function identity(out: Mat3): Mat3; /** Approximate equality: each element differs by ≤ epsilon. NaN inputs always return false. */ export declare function equals(a: Mat3Like, b: Mat3Like, epsilon?: number): boolean; /** * out = a * b (column-major matrix multiply). Returns out. * * Aliasing-safe: out may equal a or b; reads all 18 source elements into locals first. */ export declare function multiply(out: Mat3, a: Mat3Like, b: Mat3Like): Mat3; /** * out = transpose(a). Returns out. * * Aliasing-safe (transpose(m, m) is legal; reads the 6 off-diagonal elements into locals first). */ export declare function transpose(out: Mat3, a: Mat3Like): Mat3; /** * out = invert(a). Returns out. * * @degrade a singular (|det| < EPS_DET) → out = identity (same convention as D-P1; does not return null). * * @example * ```ts * // Caller-side guard: * const det = mat3DetForGuard(m); // caller computes det to decide whether to invert * const inv = mat3.invert(mat3.create(), m); * // If m is singular, inv === identity (no NaN; safe to keep using). * ``` */ export declare function invert(out: Mat3, a: Mat3Like): Mat3; /** * out = a * Scale(v) (per-column scale). Returns out. * * v takes the first 3 components (aligned with mat4.scale's vec3 input); mat3's third column is the z scale. */ export declare function scale(out: Mat3, a: Mat3Like, v: Vec3Like): Mat3; /** * out = mat3 extracted from mat4's upper-left 3x3 (drop the 4th row and 4th column). Returns out. * * Column-major mapping: mat4 col0 [0..2] / col1 [4..6] / col2 [8..10] → mat3 col0/1/2. */ export declare function fromMat4(out: Mat3, m: Mat4Like): Mat3; /** * out = transpose(invert(upper-left 3x3 of m)) (the normal-transform matrix). Returns out. * * Used to transform normals from model space to world / view space; when m has a non-uniform * scale, normals must use normalMatrix (the upper-left 3x3 of m alone is incorrect). * * CPU utility; render shaders derive normals from the world transform. * * @degrade upper-left 3x3 singular -> out = identity (same convention as D-P1, via mat3.invert). * * @example * ```ts * const N = mat3.normalMatrix(mat3.create(), modelViewMat); * // vertex shader: normal_view = N * normal_model * ``` */ export declare function normalMatrix(out: Mat3, m: Mat4Like): Mat3; //# sourceMappingURL=mat3.d.ts.map