Search
Preparing search index...
The search index is not available
gtools
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
gtools
math/quaternion
Quaternion
Class Quaternion
Hierarchy
Vector4
Quaternion
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
to
Euler
dist
equals
equals
Approximately
from
from
Array
from
Euler
from
Rotation
Matrix
is
Vector
max
min
multiply
normalize
Constructors
constructor
new
Quaternion
(
x
?:
number
, y
?:
number
, z
?:
number
, w
?:
number
)
:
Quaternion
Parameters
x:
number
= 0
y:
number
= 0
z:
number
= 0
w:
number
= 0
Returns
Quaternion
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
>
)
:
Quaternion
Parameters
vec:
Readonly
<
SimpleVector4
>
Returns
Quaternion
clone
clone
(
)
:
Quaternion
Returns
Quaternion
get
Normalized
get
Normalized
(
)
:
SimpleVector4
Returns
SimpleVector4
mul
mul
(
value
:
number
|
Readonly
<
SimpleVector4
>
)
:
Quaternion
Parameters
value:
number
|
Readonly
<
SimpleVector4
>
Returns
Quaternion
normalize
normalize
(
)
:
Quaternion
Returns
Quaternion
set
set
(
vec
:
Readonly
<
SimpleVector4
>
)
:
Quaternion
Parameters
vec:
Readonly
<
SimpleVector4
>
Returns
Quaternion
set
Data
set
Data
(
x
:
number
, y
:
number
, z
:
number
, w
:
number
)
:
Quaternion
Parameters
x:
number
y:
number
z:
number
w:
number
Returns
Quaternion
sub
sub
(
vec
:
Readonly
<
SimpleVector4
>
)
:
Quaternion
Parameters
vec:
Readonly
<
SimpleVector4
>
Returns
Quaternion
to
Array
to
Array
(
)
:
[
number
,
number
,
number
,
number
]
Returns
[
number
,
number
,
number
,
number
]
to
Euler
to
Euler
(
)
:
SimpleVector3
Returns
SimpleVector3
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
from
Euler
from
Euler
(
x
:
number
, y
:
number
, z
:
number
, result
?:
Quaternion
)
:
Quaternion
Parameters
x:
number
y:
number
z:
number
result:
Quaternion
= ...
Returns
Quaternion
Static
from
Rotation
Matrix
from
Rotation
Matrix
(
rot
:
Mat4
)
:
Quaternion
Parameters
rot:
Mat4
Returns
Quaternion
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
multiply
multiply
(
a
:
Quaternion
, b
:
Quaternion
, result
?:
Quaternion
)
:
Quaternion
Parameters
a:
Quaternion
b:
Quaternion
result:
Quaternion
= ...
Returns
Quaternion
Static
normalize
normalize<T>
(
vec
:
T
)
:
T
Type parameters
T
:
SimpleVector4
Parameters
vec:
T
Returns
T
Modules
math/quaternion
Quaternion
constructor
w
x
y
z
avg
length
ONE
ZERO
add
clone
get
Normalized
mul
normalize
set
set
Data
sub
to
Array
to
Euler
dist
equals
equals
Approximately
from
from
Array
from
Euler
from
Rotation
Matrix
is
Vector
max
min
multiply
normalize
Generated using
TypeDoc