LlRot2Axis: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Strife Onizuka (talk | contribs)
mNo edit summary
Strife Onizuka (talk | contribs)
mNo edit summary
Line 28: Line 28:
|cat3
|cat3
|cat4
|cat4
|deepnotes=<lsl>vector llRot2Axis(rotation a)
|deepnotes=<lsl>vector llRot2Axis(rotation a) {
{
    if(a.s < 0)
     return llVecNorm(<a.x, a.y, a.z>);
        return -llVecNorm(<a.x, a.y, a.z>);
    return llVecNorm(<a.x, a.y, a.z>)
}</lsl>
 
<lsl>vector llRot2Axis(rotation a) {
     return llVecNorm(<a.x, a.y, a.z>) * (1 | -(a.s < 0));
}</lsl>
}</lsl>
}}
}}

Revision as of 08:37, 16 March 2009