Module

GLMatrix.Quat.Mix

Package
purescript-gl-matrix
Repository
dirkz/purescript-gl-matrix

#rotationTo Source

rotationTo :: Vec3 -> Vec3 -> Quat

Sets a quaternion to represent the shortest rotation from one vector to another. Both vectors are assumed to be unit length.

#setAxes Source

setAxes :: Vec3 -> Vec3 -> Vec3 -> Quat

Sets the specified quaternion with values corresponding to the given axes. Each axis is a vec3 and is expected to be unit length and perpendicular to all other specified axes.

#fromMat3 Source

fromMat3 :: Mat3 -> Quat

Sets the specified quaternion with values corresponding to the given axes. Each axis is a vec3 and is expected to be unit length and perpendicular to all other specified axes.

#getAxisAngle Source

getAxisAngle :: Vec3 -> Quat -> Number

Sets the specified quaternion with values corresponding to the given axes. Each axis is a vec3 and is expected to be unit length and perpendicular to all other specified axes.

#setAxisAngle Source

setAxisAngle :: Vec3 -> Number -> Quat

Sets a quat from the given angle and rotation axis, then returns it.