Difference between revisions of "LlPow"
Jump to navigation
Jump to search
m (Line too long.) |
m |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 2: | Line 2: | ||
|sort=Pow|func=llPow | |sort=Pow|func=llPow | ||
|func_id=5|func_sleep=0.0|func_energy=10.0 | |func_id=5|func_sleep=0.0|func_energy=10.0 | ||
|func_footnote=Triggers a [[LSL_Math_Error|Math Error]] for imaginary results ((exponent != (integer)exponent) && (base < 0.0)) | |func_footnote=Triggers a [[LSL_Math_Error|Math Error]] for imaginary results <code>(({{LSLPT|exponent}} != ([[integer]]){{LSLPT|exponent}}) && ({{LSLPT|base}} < 0.0))</code> when not compiled in mono.{{PBR}} | ||
Returns NaN when compiled in mono without crash | |||
|p1_type=float|p1_name=base|p1_desc | |p1_type=float|p1_name=base|p1_desc | ||
|p2_type=float|p2_name=exponent|p2_desc | |p2_type=float|p2_name=exponent|p2_desc | ||
|return_type=float | |return_type=float | ||
|return_text=that is | |return_text=that is {{LSLP|base}} raised to the power {{LSLP|exponent}} ({{LSLP|base}}<sup>{{LSLP|exponent}}</sup>) | ||
|spec | |spec | ||
|caveats=* Can crash the script | |caveats=* Can crash the script when not compiled in mono | ||
|examples= | |examples= | ||
< | <source lang="lsl2">default { | ||
default { | |||
state_entry() { | state_entry() { | ||
llOwnerSay("llPow(5, .5) (" + (string)llPow(5, .5) + ") is equal to llSqrt(5) (" | llOwnerSay("llPow(5, .5) (" + (string)llPow(5, .5) + ") is equal to llSqrt(5) (" | ||
+ (string)llSqrt(5) + ")."); | + (string)llSqrt(5) + ")."); | ||
} | } | ||
}</ | }</source> | ||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow||[[llLog]]|}} | |also_functions={{LSL DefineRow||[[llLog]]|}} |
Revision as of 13:28, 14 September 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: float llPow( float base, float exponent );5 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a float that is base raised to the power exponent (baseexponent)
• float | base | |||
• float | exponent |
Triggers a Math Error for imaginary results ((exponent != (integer)exponent) && (base < 0.0))
when not compiled in mono.
Returns NaN when compiled in mono without crash
Caveats
Examples
default {
state_entry() {
llOwnerSay("llPow(5, .5) (" + (string)llPow(5, .5) + ") is equal to llSqrt(5) ("
+ (string)llSqrt(5) + ").");
}
}