llRot2Axis

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Summary

Function: vector llRot2Axis( rotation rot );

Returns a vector the rotation axis represented by rot

• rotation rot

Use in conjunction with llRot2Angle.
To undo use llAxisAngle2Rot or llAxes2Rot.

Examples

See Also

Functions

•  llRot2Angle
•  llAxisAngle2Rot
•  llRot2Left
•  llRot2Fwd
•  llRot2Up

Articles

•  Slerp

Deep Notes

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));
}

Search JIRA for related Issues

Signature

function vector llRot2Axis( rotation rot );