The class to maniplate quaternion. Basically,you don't need to operate raw element. You consider to use some of useful methods without editing raw element forcelly. Each element will be represented as (w;x,y,z) (1,i,j,k) is base axis for quaternion. (i,j,k is pure imaginary number) (w;x,y,z) means w1+xi+yj+zk
Get the conjugate of this quaternion
Getter for imaginary part vector. It returns the vector (x,y,z)
Get the length
Getter for W.
Getter for X.
Getter for Y.
Getter for Z.
Get normalized quaternion
Returns a quaternion that transform provided 'from' vector into 'to' vector. If 'from' cross 'to' is closer to 0 vector, axisHint is used as axis. This may only used for the situation when from vector and to vector is in relations these are negating the other.
if no vector specified to this argument, [0,1,0] will be used for default
Parse angle string in 3D. "p" means Pi. Ex) 3/4 p "d" means degree. if this unit was specified, the argument will be parsed as degree. Ex) 90d "eular(x,y,z)" means rotation in eular. This means Z-X-Y rotation like Unity. "axis(angle,x,y,z)" means rotation around specified axis. This means angle radians will be rotated around the axis (x,y,z). This angle can be specified with the character "p" or "d". "x(angle)","y(angle)" or "z(angle)" means rotation around unit axis. This angle can be specified with the character "p" or "d".
the string to be parsed as angle in 3D.
parsed rotation in Quaternion.
Generated using TypeDoc