A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.
Name | Type | Default | Description |
---|---|---|---|
x |
Number |
0.0
|
optional
The X component. |
y |
Number |
0.0
|
optional
The Y component. |
z |
Number |
0.0
|
optional
The Z component. |
w |
Number |
0.0
|
optional
The W component. |
- PackableForInterpolation
See:
Members
The W component.
-
Default Value:
0.0
The X component.
-
Default Value:
0.0
The Y component.
-
Default Value:
0.0
The Z component.
-
Default Value:
0.0
Methods
static Quaternion.fromAxisAngle(axis, angle, result) → Quaternion
Computes a quaternion representing a rotation around an axis.
Name | Type | Description |
---|---|---|
axis |
Cartesian3 |
The axis of rotation. |
angle |
Number |
The angle in radians to rotate around the axis. |
result |
Quaternion |
optional
The object onto which to store the result. |
Returns:
The modified result parameter or a new Quaternion instance if one was not provided.
Returns a string representing this quaternion in the format (x, y, z, w).
Returns:
A string representing this Quaternion.