import { ATypedArrayTuple, TTypedArrayTupleMutativeMethods } from "../a-typed-array-tuple.js"; import { TTypedArray } from "../t-typed-array.js"; import { ITypedArrayTupleFactory } from "../i-typed-array-tuple-factory.js"; import { TTypedArrayCtor } from "../t-typed-array-ctor.js"; import { IReadonlyVec2, Vec2 } from "../vec2/vec2.js"; import { TPickExcept } from "../../../typescript/t-pick-except.js"; /** * @public */ export type TMat2CtorArgs = [c1r1: number, c2r1: number, c2r2: number, c2r2: number]; /** * @public * Constructor for {@link Mat2}. */ export interface IMat2Ctor { readonly BASE: TTypedArrayCtor; /** * The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; readonly prototype: Mat2; readonly factory: ITypedArrayTupleFactory, TMat2CtorArgs>; new (): Mat2; } /** * @public * {@link Mat2}. */ export interface IReadonlyMat2 extends TPickExcept>, "update" | "setValueAt" | "setRow" | "copyFromBuffer" | "scalarMultiply" | "scalarAdd" | TTypedArrayTupleMutativeMethods> { } /** * @public * Row major 2x2 matrix. * * @remarks * See static properties for constructors. Instances are not an extension of this class, but of the static members. */ export declare abstract class Mat2 extends ATypedArrayTuple<4, TArray> { static f64: IMat2Ctor; static f32: IMat2Ctor; static i64: null; static u64: null; static u32: IMat2Ctor; static i32: IMat2Ctor; static u16: IMat2Ctor; static i16: IMat2Ctor; static u8c: IMat2Ctor; static u8: IMat2Ctor; static i8: IMat2Ctor; static getCtor(ctor: TCtor): IMat2Ctor>; protected static constructors: Map; ["constructor"]: IMat2Ctor; /** * c1r1 */ 0: number; /** * c2r1 */ 1: number; /** * c2r2 */ 2: number; /** * c2r2 */ 3: number; /** * Component-wise equals. */ isEqualTo(_other: Mat2): boolean; update(..._args: TMat2CtorArgs): void; setIdentityMatrix(): Mat2; getValueAt(_column: number, _row: number): number; setValueAt(_column: number, _row: number, _value: number): void; setScalingMatrix(_scalingFactor: number): Mat2; setTranslationMatrix(_translation: number): Mat2; scalarMultiply(_value: number, _result?: Mat2): Mat2; scalarAdd(_value: number, _result?: Mat2): Mat2; multiplyMat2(_mat: IReadonlyMat2, _result?: Mat2): Mat2; getVec2MultiplyX(_x: number): number; getRow(_row: number, _writeTo?: Vec2): Vec2; setRow(_row: number, _writeFrom: IReadonlyVec2): void; getLoggableValue(): number[][]; /** * If endianness is not supplied the platform's endianness will be used. */ copyFromBuffer(_memoryDataView: DataView, _pointer: number, _littleEndian?: boolean): void; /** * If endianness is not supplied the platform's endianness will be used. */ copyToBuffer(_memoryDataView: DataView, _pointer: number, _littleEndian?: boolean): void; /** * Although the typed array tuples extend a typed array, they are not structurally compatible. * This function returns the argument passed without modification but cast as the underlying storage type, e.g. Float32Array. */ castToBaseType(): TArray; protected TTypeGuardMat2: true; } /** * @public * Float32 {@link Mat2}. */ export type TF32Mat2 = Mat2; /** * @public * Float64 {@link Mat2}. */ export type TF64Mat2 = Mat2; //# sourceMappingURL=mat2.d.ts.map