Difference between revisions of "LlVecNorm"

From Second Life Wiki
Jump to navigation Jump to search
Line 7: Line 7:
|p1_type=vector
|p1_type=vector
|p1_name=vec
|p1_name=vec
|p1_desc
|p1_desc=Any valid vector
|p2_type|p2_name|p2_desc
|p2_type|p2_name|p2_desc
|p3_type|p3_name|p3_desc
|p3_type|p3_name|p3_desc
Line 38: Line 38:
|notes
|notes
}}
}}
[[Category:LSL_Functions]]
[[Category:LSL_Math]]
{{lowercase|llVecNorm}}
__NOTOC__
{| width="100%"
|-
|<div id="box">
== [[LSL_Type_vector|vector]] llVecNorm( [[LSL_Type_vector|vector]] vec); ==
<div style="padding: 0.5em">
* vec - Any valid vector value
</div>
</div>
|-
|
<div id="box">
== Specification ==
<div style="padding: 0.5em">
Returns the vec normalized
{|
|-
| [[LSL_Energy|Energy]]:
| 10.0
|-
| [[LSL_Sleep|Sleep]]:
| 0.0
|-
| [[LSL_Function_ID|Function ID]]:
| 13
|}
</div>
</div>
|-
|
<div id="box">
== Caveats ==
<div style="padding: 0.5em">
</div>
</div>
|-
|
<div id="box">
== Examples ==
<div style="padding: 0.5em">
<lsl>
default {
    state_entry()
    {
        vector input = <1.0,2.0,3.0>;
        llSay(0,"The normalize of "+(string)input+" is: "+(string)llVecNorm(input) );
    }
}
</lsl>
</div>
</div>
|-
|
<div id="box">
== Helper Functions ==
<div style="padding: 0.5em">
<lsl>
</lsl>
</div>
</div>
|-
|
<div id="box">
== See Also ==
<div style="padding: 0.5em">
</div>
</div>
|-
|
<div id="box">
== Notes ==
<div style="padding: 0.5em">
</div>
</div>
|}


[[Category:LSL_Functions]]
[[Category:LSL_Functions]]
[[Category:LSL_Math]]
[[Category:LSL_Math]]

Revision as of 21:03, 25 January 2007

   Outdated templated used

Please change the template from 'LSLFunctionAll' to 'LSL_Function' (just replace 'LSLFunctionAll' with 'LSL_Function', do this after fixing any other erorr messages.

Summary

Function: vector llVecNorm( vector vec );

Returns a vector that is the normal of the vector (val / llVecMag(val)).

• vector vec Any valid vector

Examples

<lsl> default {

   state_entry()
   {
       vector input = <1.0,2.0,3.0>;
       llSay(0,"The normal of "+(string)input+" is: "+(string)llVecNorm(input) );
   }

}

</lsl>

Deep Notes

Search JIRA for related Issues

Signature

function vector llVecNorm( vector vec );