import { vec2, vec3, vec4 } from 'gl-matrix'; declare namespace tuples { /** * Auxiliary 2-tuple of GLsizei values. */ type GLsizei2 = [GLsizei, GLsizei]; /** * Auxiliary 3-tuple of GLsizei values. */ type GLsizei3 = [GLsizei, GLsizei, GLsizei]; /** * Auxiliary 4-tuple of GLsizei values. */ type GLsizei4 = [GLsizei, GLsizei, GLsizei, GLsizei]; /** * Auxiliary 2-tuple of GLfloat values. */ type GLfloat2 = [GLfloat, GLfloat]; /** * Auxiliary 3-tuple of GLfloat values. */ type GLfloat3 = [GLfloat, GLfloat, GLfloat]; /** * Auxiliary 4-tuple of GLfloat values. */ type GLfloat4 = [GLfloat, GLfloat, GLfloat, GLfloat]; /** * Auxiliary 3-tuple of GLclampf values. */ type GLclampf2 = [GLclampf, GLclampf]; /** * Auxiliary 3-tuple of GLclampf values. */ type GLclampf3 = [GLclampf, GLclampf, GLclampf]; /** * Auxiliary 4-tuple of GLclampf values. */ type GLclampf4 = [GLclampf, GLclampf, GLclampf, GLclampf]; /** * Auxiliary 5-tuple of GLclampf values. */ type GLclampf5 = [GLclampf, GLclampf, GLclampf, GLclampf, GLclampf]; /** * Creates a tuple from a array buffer of the same size. * @param buffer - Array of two float32 values. * @returns - 2-tuple of specified type (GLsizei, GLfloat, or GLclampf). */ function tuple2(buffer: Float32Array | vec2): [T, T]; /** * Creates a tuple from a array buffer of the same size. * @param buffer - Array of three float32 values. * @returns - 3-tuple of specified type (GLsizei, GLfloat, or GLclampf). */ function tuple3(buffer: Float32Array | vec3): [T, T, T]; /** * Creates a tuple from a array buffer of the same size. * @param buffer - Array of four float32 values. * @returns - 4-tuple of specified type (GLsizei, GLfloat, or GLclampf). */ function tuple4(buffer: Float32Array | vec4): [T, T, T, T]; /** * Clamps a single GLclampf/GLfloat value to the range [0.0, 1.0]. If clamping is necessary, a user-level message * will be logged to console. * @param value - Single GLclampf/GLfloat value to clamp to range [0.0, 1.0]. * @param semantic - String describing the value's semantic, used for the user-level log message. * @returns - Clamped value. */ function clampf(value: GLclampf | GLfloat, semantic?: string): GLclampf | GLfloat; /** * Clamps each GLclampf/GLfloat value of a 2-tuple to the range [0.0, 1.0]. If clamping is necessary, a user-level * message will be logged to console. * @param tuple - 2-tuple of GLclampf/GLfloat values, each to be clamped to range [0.0, 1.0]. * @param semantic - String describing the tuple's semantic, used for the user-level log message. * @returns - Clamped tuple. */ function clampf2(tuple: GLclampf2 | GLfloat2, semantic?: string): GLclampf2 | GLfloat2; /** * Clamps each GLclampf/GLfloat value of a 3-tuple to the range [0.0, 1.0]. If clamping is necessary, a user-level * message will be logged to console. * @param tuple - 3-tuple of GLclampf/GLfloat values, each to be clamped to range [0.0, 1.0]. * @param semantic - String describing the tuple's semantic, used for the user-level log message. * @returns - Clamped tuple. */ function clampf3(tuple: GLclampf3 | GLfloat3, semantic?: string): GLclampf3 | GLfloat3; /** * Clamps each GLclampf/GLfloat value of a 4-tuple to the range [0.0, 1.0]. If clamping is necessary, a user-level * message will be logged to console. * @param tuple - 4-tuple of GLclampf/GLfloat values, each to be clamped to range [0.0, 1.0]. * @param semantic - String describing the tuple's semantic, used for the user-level log message. * @returns - Clamped tuple. */ function clampf4(tuple: GLclampf4 | GLfloat4, semantic?: string): GLclampf4 | GLfloat4; /** * Creates a duplicate of a 2-tuple into another tuple. * @param tuple - Source tuple to create duplicate of. */ function duplicate2(tuple: [T, T]): [T, T]; /** * Creates a duplicate of a 3-tuple into another tuple. * @param tuple - Source tuple to create duplicate of. */ function duplicate3(tuple: [T, T, T]): [T, T, T]; /** * Creates a duplicate of a 4-tuple into another tuple. * @param tuple - Source tuple to create duplicate of. */ function duplicate4(tuple: [T, T, T, T]): [T, T, T, T]; /** * Checks whether or not two 2-tuples have identical values. * @param tuple0 - First 2-tuple/operand for comparison. * @param tuple1 - Second 2-tuple/operand for comparison. * @returns - True iff tuples are equal in all two values (in their sequence). */ function equals2(t0: [T, T], t1: [T, T]): boolean; /** * Checks whether or not two 3-tuples have identical values. * @param tuple0 - First 3-tuple/operand for comparison. * @param tuple1 - Second 3-tuple/operand for comparison. * @returns - True iff tuples are equal in all three values (in their sequence). */ function equals3(t0: [T, T, T], t1: [T, T, T]): boolean; /** * Checks whether or not two 4-tuples have identical values. * @param tuple0 - First 4-tuple/operand for comparison. * @param tuple1 - Second 4-tuple/operand for comparison. * @returns - True iff tuples are equal in all four values (in their sequence). */ function equals4(t0: [T, T, T, T], t1: [T, T, T, T]): boolean; } export = tuples;