type
-
-
Is the set of all complex numbers with
f16/f32/f64real and imaginary (i,j, &k) parts.
-
quaternion64 quaternion128 quaternion256
-
-
fN->quaternion4N(e.g.f32->quaternion128) -
complex2N->quaternion4N(e.g.complex64->quaternion128)
-
Interpretation
-
"It's a bit odd that the value is an operation. It's just a very mathematical approach to it. It's basically an extension of how complex numbers are written mathematically, e.g.,
1 + 2i". -
"It's more just syntax sugar for setting its fields, I think".
rot: quaternion128 = quaternion(x=0, y=0, z=0, w=1) // arguments must be named, to avoid ambiguity
rot: quaternion128 = 1 + 0i + 0j + 0k // this is valid.
-
rot: quaternion128 = 1, same as1 + 0i + 0j + 0k.-
This is the identity quaternion.
-
-
rot: quaternion128 = 0, same as0 + 0i + 0j + 0k.
Procedures
-
Quaternion from X :
-
-
(real, imag, jmag, kmag: Float) -> (Quaternion_Type)
-
-
-
(f: f32) -> (quaternion128)
-
-
-
(m: matrix[3, 3]f32) -> (quaternion128)
-
-
-
(m: matrix[4, 4]f32) -> (quaternion128)
-
-
-
quaternion_from_matrix.... -
quaternion_from_scalar....
-
-
-
Quaternion from angle :
-
-
(angle_radians: f32, axis: [3]f32) -> (quaternion128)
-
-
Using
quaternion_angle_axis, specifying the axis automatically:-
quaternion_from_euler_angle_x.-
(angle: f32) -> (quaternion128)
-
-
quaternion_from_euler_angle_y.-
(angle: f32) -> (quaternion128)
-
-
quaternion_from_euler_angle_z.-
(angle: f32) -> (quaternion128)
-
-
-
Using
quaternion_from_euler_angle_x/y/z, specifying the operation order:-
quaternion_from_euler_angles.-
(t1, t2, t3: f32, order: Euler_Angle_Order) -> (quaternion128)
-
-
-
quaternion_from_pitch_yaw_roll.-
(pitch, yaw, roll: f32) -> (quaternion128) -
Interestingly, does not use any of the above procedures.
-
.
-
-
-
Quaternion from vectors3 :
-
quaternion_from_forward_and_up.-
(forward, up: [3]f32) -> (quaternion128)
-
-
-
(eye, centre: [3]f32, up: [3]f32) -> (quaternion128)
-
-
quaternion_between_two_vector3.-
(from, to: [3]f32) -> (quaternion128)
-
-
-
Quaternion to quaternion
-
-
(q: quaternion128, v: [3]f32) -> ([3]f32)
-
-
-
(a, b: quaternion128, t: f32) -> (quaternion128)
-
-
-
(x, y: quaternion128, t: f32) -> (quaternion128)
-
-
-
(q1, q2, s1, s2: quaternion128, h: f32) -> (quaternion128)
-
-
-
(quaternion128) -> (quaternion128)
-
-
-
(quaternion128) -> (quaternion128)
-
-
-
X from quaternion :
-
real. -
imag. -
jmag. -
kmag. -
conj. -
-
(q: quaternion128) -> (f32)
-
-
-
(q: quaternion128) -> (angle: f32, axis: [3]f32)
-
-
euler_angles_from_quaternion.-
(m: quaternion128, order: Euler_Angle_Order) -> (t1, t2, t3: f32)
-
-
-
(q: quaternion128) -> ([3]f32)
-
-
pitch_yaw_roll_from_quaternion.-
(q: quaternion128) -> (pitch, yaw, roll: f32)
-
-
-
(q: quaternion128) -> (f32)
-
-
-
(q: quaternion128) -> (f32)
-
-
-
(q: quaternion128) -> (f32)
-
-