finite: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma1 |Game name= | | arma1 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Math |GROUP1= | |gr1= Math |GROUP1= | ||
| Returns [[true]] if the provided number is finite (not infinite and a valid number). | | Returns [[true]] if the provided number is finite (not infinite and a valid number). | ||
Line 13: | Line 11: | ||
* Maximum finite [[Number]] : 3.40282e+38 | * Maximum finite [[Number]] : 3.40282e+38 | ||
* Minimum finite [[Number]] : -3.40282e+38 }}|DESCRIPTION= | * Minimum finite [[Number]] : -3.40282e+38 }}|DESCRIPTION= | ||
| [[finite]] number |SYNTAX= | | [[finite]] number |SYNTAX= | ||
Line 20: | Line 17: | ||
| [[Boolean]] |RETURNVALUE= | | [[Boolean]] |RETURNVALUE= | ||
|x1= <code>[[finite]] 123; {{cc|returns true}}</code> |EXAMPLE1= | |x1= <code>[[finite]] 123; {{cc|returns true}}</code> |EXAMPLE1= | ||
|x2= <code>[[finite]] [[log]] -1; {{cc|returns false}}</code> |EXAMPLE2= | |x2= <code>[[finite]] [[log]] -1; {{cc|returns false}}</code> |EXAMPLE2= | ||
|x3= <code>[[if]] ([[not]] [[finite]] [[log]] -1) [[then]] { [[hint]] "Infinite" };</code> |EXAMPLE3= | |x3= <code>[[if]] ([[not]] [[finite]] [[log]] -1) [[then]] { [[hint]] "Infinite" };</code> |EXAMPLE3= | ||
| |SEEALSO= | | |SEEALSO= |
Revision as of 01:21, 17 January 2021
Description
- Description:
- Returns true if the provided number is finite (not infinite and a valid number).
- Groups:
- Math
Syntax
Examples
- Example 1:
finite 123; // returns true
- Example 2:
finite log -1; // returns false
- Example 3:
if (not finite log -1) then { hint "Infinite" };
Additional Information
- See also:
- See also needed
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on 27 Sep, 2013
- Killzone_Kid
-
Don't get high hopes with this command thinking what a great way of catching divisions by zero, the command is pretty useless in this respect:
// Arma 2 hint str finite (10/0); // true ... O_o Huh???? hint str (10/0); // 0 ... Weird, but that explains it. // Arma 3 hint str finite (10/0); // true + Error Zero Divisor hint str finite 10; // true hint str finite 1000000000000000000000000000000000000000; // false