Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Float32Vector2

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

Hierarchy

  • Vector2Base<Float32Array>
    • Float32Vector2

Index

Constructors

constructor

Properties

Protected _values

_values: Float32Array

Values that the vector contains.

Accessors

magnitude

  • get magnitude(): number

values

  • get values(): T

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

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

Methods

add

mulByScalar

  • Multiply the vector by scalar and returns new Float32Vector2.

    This method does not mutate the vector.

    Parameters

    • scalar: number

    Returns Float32Vector2

sub

toString

  • toString(): string

Generated using TypeDoc