Search
Preparing search index...
The search index is not available
gtools
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
gtools
math/vector4
Vector4
Class Vector4
Hierarchy
Vector4
Quaternion
Implements
SimpleVector4
Index
Constructors
constructor
Properties
w
x
y
z
Accessors
avg
length
ONE
ZERO
Methods
add
clone
get
Normalized
mul
normalize
set
set
Data
sub
to
Array
dist
equals
equals
Approximately
from
from
Array
is
Vector
max
min
normalize
Constructors
constructor
new
Vector4
(
x
?:
number
, y
?:
number
, z
?:
number
, w
?:
number
)
:
Vector4
Parameters
x:
number
= 0
y:
number
= 0
z:
number
= 0
w:
number
= 0
Returns
Vector4
Properties
w
w
:
number
= 0
x
x
:
number
= 0
y
y
:
number
= 0
z
z
:
number
= 0
Accessors
avg
get
avg
(
)
:
number
Returns
number
length
get
length
(
)
:
number
Returns
number
Static
ONE
get
ONE
(
)
:
Vector4
Returns
Vector4
Static
ZERO
get
ZERO
(
)
:
Vector4
Returns
Vector4
Methods
add
add
(
vec
:
Readonly
<
SimpleVector4
>
)
:
Vector4
Parameters
vec:
Readonly
<
SimpleVector4
>
Returns
Vector4
clone
clone
(
)
:
Vector4
Returns
Vector4
get
Normalized
get
Normalized
(
)
:
SimpleVector4
Returns
SimpleVector4
mul
mul
(
value
:
number
|
Readonly
<
SimpleVector4
>
)
:
Vector4
Parameters
value:
number
|
Readonly
<
SimpleVector4
>
Returns
Vector4
normalize
normalize
(
)
:
Vector4
Returns
Vector4
set
set
(
vec
:
Readonly
<
SimpleVector4
>
)
:
Vector4
Parameters
vec:
Readonly
<
SimpleVector4
>
Returns
Vector4
set
Data
set
Data
(
x
:
number
, y
:
number
, z
:
number
, w
:
number
)
:
Vector4
Parameters
x:
number
y:
number
z:
number
w:
number
Returns
Vector4
sub
sub
(
vec
:
Readonly
<
SimpleVector4
>
)
:
Vector4
Parameters
vec:
Readonly
<
SimpleVector4
>
Returns
Vector4
to
Array
to
Array
(
)
:
[
number
,
number
,
number
,
number
]
Returns
[
number
,
number
,
number
,
number
]
Static
dist
dist
(
vecA
:
Readonly
<
SimpleVector4
>
, vecB
:
Readonly
<
SimpleVector4
>
)
:
number
Parameters
vecA:
Readonly
<
SimpleVector4
>
vecB:
Readonly
<
SimpleVector4
>
Returns
number
Static
equals
equals
(
vecA
:
Readonly
<
SimpleVector4
>
, vecB
:
Readonly
<
SimpleVector4
>
)
:
boolean
Parameters
vecA:
Readonly
<
SimpleVector4
>
vecB:
Readonly
<
SimpleVector4
>
Returns
boolean
Static
equals
Approximately
equals
Approximately
(
vecA
:
Readonly
<
SimpleVector4
>
, vecB
:
Readonly
<
SimpleVector4
>
, EPSILON
?:
number
)
:
boolean
Parameters
vecA:
Readonly
<
SimpleVector4
>
vecB:
Readonly
<
SimpleVector4
>
EPSILON:
number
= 0.0000001
Returns
boolean
Static
from
from
(
valA
:
number
, valB
?:
number
, valC
?:
number
, valD
?:
number
)
:
Vector4
Parameters
valA:
number
valB:
number
= ...
valC:
number
= ...
valD:
number
= ...
Returns
Vector4
Static
from
Array
from
Array
(
val
:
[
number
,
number
,
number
,
number
]
|
Float32Array
)
:
Vector4
Parameters
val:
[
number
,
number
,
number
,
number
]
|
Float32Array
Returns
Vector4
Static
is
Vector
is
Vector
(
item
:
any
)
:
item
is
SimpleVector4
Parameters
item:
any
Returns
item
is
SimpleVector4
Static
max
max
(
vecA
:
Readonly
<
SimpleVector4
>
, vecB
:
Readonly
<
SimpleVector4
>
)
:
Vector4
Parameters
vecA:
Readonly
<
SimpleVector4
>
vecB:
Readonly
<
SimpleVector4
>
Returns
Vector4
Static
min
min
(
vecA
:
Readonly
<
SimpleVector4
>
, vecB
:
Readonly
<
SimpleVector4
>
)
:
Vector4
Parameters
vecA:
Readonly
<
SimpleVector4
>
vecB:
Readonly
<
SimpleVector4
>
Returns
Vector4
Static
normalize
normalize<T>
(
vec
:
T
)
:
T
Type parameters
T
:
SimpleVector4
Parameters
vec:
T
Returns
T
Modules
math/vector4
Vector4
constructor
w
x
y
z
avg
length
ONE
ZERO
add
clone
get
Normalized
mul
normalize
set
set
Data
sub
to
Array
dist
equals
equals
Approximately
from
from
Array
is
Vector
max
min
normalize
Generated using
TypeDoc