Difference between revisions of "LlVecNorm"

From Second Life Wiki
Jump to navigation Jump to search
m (lsl code tagging)
Line 5: Line 5:
|p1_type=vector|p1_name=vec|p1_desc=Any valid vector
|p1_type=vector|p1_name=vec|p1_desc=Any valid vector
|return_type=vector
|return_type=vector
|return_text=that is the normal of the vector ('''vec''' / {{LSLG|llVecMag}}('''vec''')).
|return_text=that is the unit vector along the direction set by vec ('''vec''' / {{LSLG|llVecMag}}('''vec''')) (i.e. llVecNorm() "normalizes" the vector).
|spec
|spec
|caveats
|caveats
Line 14: Line 14:
     {
     {
         vector input = <1.0,2.0,3.0>;
         vector input = <1.0,2.0,3.0>;
         llSay(0,"The normal of "+(string)input+" is: "+(string)llVecNorm(input) );
         llSay(0,"The unit vector on "+(string)input+" is: "+(string)llVecNorm(input) );
     }
     }
}
}

Revision as of 01:56, 23 May 2009