Skip to content

format

typescript
Quaternion.FromEulerXYZ(x, y, z)

class: Quaternion

description

Converts a set of Euler angles to a quaternion and returns it.

The rotation is applied in the order of rotating around the z-axis, then the y-axis, and finally the x-axis.

parameter

param_nametypedescription
xnumberThe angle in degrees around the x-axis.
ynumberThe angle in degrees around the y-axis.
znumberThe angle in degrees around the z-axis.

return

typedescription
QuaternionThe quaternion representing the rotation.

code example

typescript
function QuaternionTest (){
    let rotation = Quaternion.FromEulerXYZ(1,2,3);
}