Difference between revisions of "LlVecNorm"

From Second Life Wiki
Jump to navigation Jump to search
(I forget what happens if you feed this function a zero vector, this edge case should be documented. We are talking about advanced mathematics, if they don't know normalized, they won't know unit too.)
Line 2: Line 2:
|func=llVecNorm
|func=llVecNorm
|func_id=13|func_sleep=0.0|func_energy=10.0
|func_id=13|func_sleep=0.0|func_energy=10.0
|func_footnote
|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 unit vector along the direction set by vec ('''vec''' / {{LSLG|llVecMag}}('''vec''')) (i.e. llVecNorm() "normalizes" the vector).
|Return_text=that is '''vec''' normalized (a unit vector sharing the same direction as '''vec''').
|func_footnote=Functionally equivalent to: <code>'''vec''' / [[llVecMag]]('''vec'''))</code>
|spec
|spec
|caveats
|caveats
Line 19: Line 19:
</lsl>
</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||{{LSLG|llVecMag}}|}}
|also_functions={{LSL DefineRow||[[llVecMag]]|}}
{{LSL DefineRow||{{LSLG|llVecDist}}|}}
{{LSL DefineRow||[[llVecDist]]|}}
|also_events
|also_events
|also_tests
|also_tests

Revision as of 06:22, 23 May 2009