OsMin
From OpenSimulator
(Difference between revisions)
m (Added permissions and delay information) |
m (Typo) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
− | |function_syntax= | + | |function_syntax=float osMin(float a, float b) |
|threat_level=ignored | |threat_level=ignored | ||
|permissions=true | |permissions=true | ||
|delay=0 | |delay=0 | ||
|description=Returns the smaller of two numbers. Wraps to the system Math.Min() function. | |description=Returns the smaller of two numbers. Wraps to the system Math.Min() function. | ||
− | + | |additional_info=This function was added in 0.7.4-post-fixes | |
+ | |ossl_example=<source lang="lsl"> | ||
+ | // | ||
+ | // osMin Script Exemple | ||
+ | // Author: djphil | ||
+ | // | ||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Touch to see osMin usage."); | ||
+ | } | ||
+ | |||
+ | touch_start(integer number) | ||
+ | { | ||
+ | float a = llFrand(10.0); | ||
+ | float b = llFrand(10.0); | ||
+ | llSay(PUBLIC_CHANNEL, "\nThe smaller value between " + (string)a + " and " + (string)b + " is " + (string)osMin(a, b)); | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | }} | ||
== See Also == | == See Also == | ||
+ | * [[osMin]] | ||
* [[osMax]] | * [[osMax]] |
Latest revision as of 15:32, 5 December 2020
float osMin(float a, float b)
| |
Returns the smaller of two numbers. Wraps to the system Math.Min() function. | |
Threat Level | This function does not do a threat level check |
Permissions | Use of this function is always allowed by default |
Extra Delay | 0 seconds |
Example(s) | |
// // osMin Script Exemple // Author: djphil // default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osMin usage."); } touch_start(integer number) { float a = llFrand(10.0); float b = llFrand(10.0); llSay(PUBLIC_CHANNEL, "\nThe smaller value between " + (string)a + " and " + (string)b + " is " + (string)osMin(a, b)); } } | |
Notes | |
This function was added in 0.7.4-post-fixes |
[edit] See Also
- osMin
- osMax