vector llRot2Axis( rotation rot );
Forced delay: 0.0 seconds. Energy: 10.0.
Use in conjunction with llRot2Angle.
To undo use llAxisAngle2Rot or llAxes2Rot.
Returns a vector the rotation axis represented by rot
vector llRot2Axis(rotation a) {
if(a.s < 0)
return -llVecNorm(<a.x, a.y, a.z>);
return llVecNorm(<a.x, a.y, a.z>)
}
vector llRot2Axis(rotation a) {
return llVecNorm(<a.x, a.y, a.z>) * (1 | -(a.s < 0));
}