Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace tuples

Index

Type aliases

GLclampf2

GLclampf2: [GLclampf, GLclampf]

Auxiliary 3-tuple of GLclampf values.

GLclampf3

GLclampf3: [GLclampf, GLclampf, GLclampf]

Auxiliary 3-tuple of GLclampf values.

GLclampf4

GLclampf4: [GLclampf, GLclampf, GLclampf, GLclampf]

Auxiliary 4-tuple of GLclampf values.

GLclampf5

GLclampf5: [GLclampf, GLclampf, GLclampf, GLclampf, GLclampf]

Auxiliary 5-tuple of GLclampf values.

GLfloat2

GLfloat2: [GLfloat, GLfloat]

Auxiliary 2-tuple of GLfloat values.

GLfloat3

GLfloat3: [GLfloat, GLfloat, GLfloat]

Auxiliary 3-tuple of GLfloat values.

GLfloat4

GLfloat4: [GLfloat, GLfloat, GLfloat, GLfloat]

Auxiliary 4-tuple of GLfloat values.

GLsizei2

GLsizei2: [GLsizei, GLsizei]

Auxiliary 2-tuple of GLsizei values.

GLsizei3

GLsizei3: [GLsizei, GLsizei, GLsizei]

Auxiliary 3-tuple of GLsizei values.

GLsizei4

GLsizei4: [GLsizei, GLsizei, GLsizei, GLsizei]

Auxiliary 4-tuple of GLsizei values.

Functions

clampf

  • clampf(value: GLclampf | GLfloat, semantic?: string): GLclampf | GLfloat
  • 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.

    Parameters

    • value: GLclampf | GLfloat

      Single GLclampf/GLfloat value to clamp to range [0.0, 1.0].

    • Optional semantic: string

      String describing the value's semantic, used for the user-level log message.

    Returns GLclampf | GLfloat

    • Clamped value.

clampf2

  • 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.

    Parameters

    • tuple: GLclampf2 | GLfloat2

      2-tuple of GLclampf/GLfloat values, each to be clamped to range [0.0, 1.0].

    • Optional semantic: string

      String describing the tuple's semantic, used for the user-level log message.

    Returns GLclampf2 | GLfloat2

    • Clamped tuple.

clampf3

  • 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.

    Parameters

    • tuple: GLclampf3 | GLfloat3

      3-tuple of GLclampf/GLfloat values, each to be clamped to range [0.0, 1.0].

    • Optional semantic: string

      String describing the tuple's semantic, used for the user-level log message.

    Returns GLclampf3 | GLfloat3

    • Clamped tuple.

clampf4

  • 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.

    Parameters

    • tuple: GLclampf4 | GLfloat4

      4-tuple of GLclampf/GLfloat values, each to be clamped to range [0.0, 1.0].

    • Optional semantic: string

      String describing the tuple's semantic, used for the user-level log message.

    Returns GLclampf4 | GLfloat4

    • Clamped tuple.

duplicate2

  • duplicate2<T>(tuple: [T, T]): [T, T]
  • Creates a duplicate of a 2-tuple into another tuple.

    Type parameters

    • T: number

    Parameters

    • tuple: [T, T]

      Source tuple to create duplicate of.

    Returns [T, T]

duplicate3

  • duplicate3<T>(tuple: [T, T, T]): [T, T, T]
  • Creates a duplicate of a 3-tuple into another tuple.

    Type parameters

    • T: number

    Parameters

    • tuple: [T, T, T]

      Source tuple to create duplicate of.

    Returns [T, T, T]

duplicate4

  • duplicate4<T>(tuple: [T, T, T, T]): [T, T, T, T]
  • Creates a duplicate of a 4-tuple into another tuple.

    Type parameters

    • T: number

    Parameters

    • tuple: [T, T, T, T]

      Source tuple to create duplicate of.

    Returns [T, T, T, T]

equals2

  • equals2<T>(t0: [T, T], t1: [T, T]): boolean
  • Checks whether or not two 2-tuples have identical values.

    Type parameters

    • T: number

    Parameters

    • t0: [T, T]
    • t1: [T, T]

    Returns boolean

    • True iff tuples are equal in all two values (in their sequence).

equals3

  • equals3<T>(t0: [T, T, T], t1: [T, T, T]): boolean
  • Checks whether or not two 3-tuples have identical values.

    Type parameters

    • T: number

    Parameters

    • t0: [T, T, T]
    • t1: [T, T, T]

    Returns boolean

    • True iff tuples are equal in all three values (in their sequence).

equals4

  • equals4<T>(t0: [T, T, T, T], t1: [T, T, T, T]): boolean
  • Checks whether or not two 4-tuples have identical values.

    Type parameters

    • T: number

    Parameters

    • t0: [T, T, T, T]
    • t1: [T, T, T, T]

    Returns boolean

    • True iff tuples are equal in all four values (in their sequence).

tuple2

  • tuple2<T>(buffer: Float32Array | vec2): [T, T]
  • Creates a tuple from a array buffer of the same size.

    Type parameters

    • T: number

    Parameters

    • buffer: Float32Array | vec2

      Array of two float32 values.

    Returns [T, T]

    • 2-tuple of specified type (GLsizei, GLfloat, or GLclampf).

tuple3

  • tuple3<T>(buffer: Float32Array | vec3): [T, T, T]
  • Creates a tuple from a array buffer of the same size.

    Type parameters

    • T: number

    Parameters

    • buffer: Float32Array | vec3

      Array of three float32 values.

    Returns [T, T, T]

    • 3-tuple of specified type (GLsizei, GLfloat, or GLclampf).

tuple4

  • tuple4<T>(buffer: Float32Array | vec4): [T, T, T, T]
  • Creates a tuple from a array buffer of the same size.

    Type parameters

    • T: number

    Parameters

    • buffer: Float32Array | vec4

      Array of four float32 values.

    Returns [T, T, T, T]

    • 4-tuple of specified type (GLsizei, GLfloat, or GLclampf).