Difference between revisions of "LlVecMag"
Jump to navigation
Jump to search
m (LSL llVecMag moved to LlVecMag: removing prefix) |
|||
Line 1: | Line 1: | ||
{{LSL_Function | {{LSL_Function | ||
|func=llVecMag | |func=llVecMag | ||
|func_id=12 | |func_id=12|func_sleep=0.0|func_energy=10.0 | ||
|func_sleep=0.0 | |||
|func_energy=10.0 | |||
|func_footnote | |func_footnote | ||
|p1_type=vector | |p1_type=vector|p1_name=vec|p1_desc | ||
|p1_name=vec | |||
|p1_desc | |||
|return_type=float | |return_type=float | ||
|return_text=that is the magnitude of the vector (the distance from '''vec''' to <0.0, 0.0, 0.0>). | |return_text=that is the magnitude of the vector (the distance from '''vec''' to <0.0, 0.0, 0.0>). | ||
|spec | |spec | ||
|caveats | |caveats | ||
|examples= | |examples=<pre> | ||
< | |||
default { | default { | ||
state_entry() | state_entry() | ||
Line 32: | Line 16: | ||
} | } | ||
} | } | ||
</ | </pre> | ||
|helpers | |helpers | ||
|also_functions= | |also_functions= | ||
{{LSL DefineRow||[[llVecNorm]]|The vector normal}} | |||
{{LSL DefineRow||[[llVecDist]]|The distance between two vectors}} | |||
|also_events | |also_events | ||
|also_tests | |also_tests | ||
Line 45: | Line 30: | ||
|cat2 | |cat2 | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
}} | }} |
Revision as of 20:15, 22 February 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: float llVecMag( vector vec );12 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a float that is the magnitude of the vector (the distance from vec to <0.0, 0.0, 0.0>).
• vector | vec |
Caveats
Examples
default { state_entry() { vector input = <1.0,2.0,3.0>; llSay(0,"The magnitude of "+(string)input+" is: "+(string)llVecMag(input) ); } }