ts-vector-math
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Vector4
constructor
_values
a
b
g
r
rg
rgb
rgba
w
x
xy
xyz
xyzw
y
z
one
zero
add
at
copy
divide
equals
length
multiply
negate
normalize
reset
scale
squared
Length
subtract
difference
lerp
product
quotient
sum
Hierarchy
Vector4
Index
Constructors
constructor
Properties
_values
Accessors
a
b
g
r
rg
rgb
rgba
w
x
xy
xyz
xyzw
y
z
one
zero
Methods
add
at
copy
divide
equals
length
multiply
negate
normalize
reset
scale
squared
Length
subtract
difference
lerp
product
quotient
sum
Constructors
constructor
new
Vector4
(
values
?:
number
[]
)
:
Vector4
Parameters
Optional
values:
number
[]
Returns
Vector4
Properties
Private
_values
_values
:
Float32Array
= new Float32Array(4)
Accessors
a
a
:
b
b
:
g
g
:
r
r
:
rg
rg
:
rgb
rgb
:
rgba
rgba
:
w
w
:
x
x
:
xy
xy
:
xyz
xyz
:
xyzw
xyzw
:
y
y
:
z
z
:
Static
one
one
:
Static
zero
zero
:
Methods
add
add
(
vector
:
Vector4
, dest
?:
Vector4
)
:
Vector4
Parameters
vector:
Vector4
Optional
dest:
Vector4
Returns
Vector4
at
at
(
index
:
number
)
:
number
Parameters
index:
number
Returns
number
copy
copy
(
dest
?:
Vector4
)
:
Vector4
Parameters
Optional
dest:
Vector4
Returns
Vector4
divide
divide
(
vector
:
Vector4
, dest
?:
Vector4
)
:
Vector4
Parameters
vector:
Vector4
Optional
dest:
Vector4
Returns
Vector4
equals
equals
(
vector
:
Vector4
, threshold
?:
number
)
:
boolean
Parameters
vector:
Vector4
Default value
threshold:
number
= EPSILON
Returns
boolean
length
length
(
)
:
number
Returns
number
multiply
multiply
(
vector
:
Vector4
, dest
?:
Vector4
)
:
Vector4
Parameters
vector:
Vector4
Optional
dest:
Vector4
Returns
Vector4
negate
negate
(
dest
?:
Vector4
)
:
Vector4
Parameters
Optional
dest:
Vector4
Returns
Vector4
normalize
normalize
(
dest
?:
Vector4
)
:
Vector4
Parameters
Optional
dest:
Vector4
Returns
Vector4
reset
reset
(
)
:
void
Returns
void
scale
scale
(
value
:
number
, dest
?:
Vector4
)
:
Vector4
Parameters
value:
number
Optional
dest:
Vector4
Returns
Vector4
squared
Length
squared
Length
(
)
:
number
Returns
number
subtract
subtract
(
vector
:
Vector4
, dest
?:
Vector4
)
:
Vector4
Parameters
vector:
Vector4
Optional
dest:
Vector4
Returns
Vector4
Static
difference
difference
(
vector
:
Vector4
, vector2
:
Vector4
, dest
?:
Vector4
)
:
Vector4
Parameters
vector:
Vector4
vector2:
Vector4
Optional
dest:
Vector4
Returns
Vector4
Static
lerp
lerp
(
a
:
Vector4
, b
:
Vector4
, t
:
number
, dest
?:
Vector4
)
:
Vector4
Parameters
a:
Vector4
b:
Vector4
t:
number
Optional
dest:
Vector4
Returns
Vector4
Static
product
product
(
vector
:
Vector4
, vector2
:
Vector4
, dest
?:
Vector4
)
:
Vector4
Parameters
vector:
Vector4
vector2:
Vector4
Optional
dest:
Vector4
Returns
Vector4
Static
quotient
quotient
(
vector
:
Vector4
, vector2
:
Vector4
, dest
?:
Vector4
)
:
Vector4
Parameters
vector:
Vector4
vector2:
Vector4
Optional
dest:
Vector4
Returns
Vector4
Static
sum
sum
(
vector
:
Vector4
, vector2
:
Vector4
, dest
?:
Vector4
)
:
Vector4
Parameters
vector:
Vector4
vector2:
Vector4
Optional
dest:
Vector4
Returns
Vector4
Generated using
TypeDoc