Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Float32Vector4

A 4-dimensional vector of single-precision float numbers.

Hierarchy

  • Vector4Base<Float32Array>
    • Float32Vector4

Index

Constructors

constructor

  • new Float32Vector4(x: number, y: number, z: number, w: number): Float32Vector4

Properties

Protected _values

_values: Float32Array

Values that the vector contains.

Accessors

magnitude

  • get magnitude(): number

values

  • get values(): T

w

  • get w(): number
  • set w(value: number): void
  • Returns w value of the vector.

    Returns number

  • Set the value as new w.

    Parameters

    • value: number

    Returns void

x

  • get x(): number
  • set x(value: number): void
  • Returns x value of the vector.

    Returns number

  • Set the value as new x.

    Parameters

    • value: number

    Returns void

xyz

y

  • get y(): number
  • set y(value: number): void
  • Returns y value of the vector.

    Returns number

  • Set the value as new y.

    Parameters

    • value: number

    Returns void

z

  • get z(): number
  • set z(value: number): void
  • Returns z value of the vector.

    Returns number

  • Set the value as new z.

    Parameters

    • value: number

    Returns void

Methods

add

mulByScalar

  • Multiply the vector by scalar and returns new Float32Vector4.

    This method does not mutate the vector.

    Parameters

    • scalar: number

    Returns Float32Vector4

sub

toString

  • toString(): string

Generated using TypeDoc