finite: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(74 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | |||
|game1= arma1 | |||
|version1= 1.00 | |||
|game2= arma2 | |||
|version2= 1.00 | |||
|game3= arma2oa | |||
|version3= 1.50 | |||
|game4= tkoh | |||
|version4= 1.00 | |||
|game5= arma3 | |||
|version5= 0.50 | |||
|gr1= Math | |||
|descr= Returns [[true]] if the provided number is finite (not infinite and a valid number). | |||
{{ Feature | Informative | | |||
* Maximum finite [[Number]] : 3.40282e+38 | |||
* Minimum finite [[Number]] : -3.40282e+38 }} | |||
|s1= [[finite]] number | |||
|p1= number: [[Number]] | |||
|r1= [[Boolean]] | |||
|x1= <sqf>finite 123; // returns true</sqf> | |||
|x2= <sqf>finite log -1; // returns false</sqf> | |||
|x3= <sqf>if (not finite log -1) then { hint "Infinite" };</sqf> | |||
' | |seealso= [[a / b]] | ||
}} | |||
<dl class="command_description"> | |||
<dt><dt> | |||
<dd class="notedate">Posted on 27 Sep, 2013</dd> | |||
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt> | |||
<dd class="note"> | |||
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: | |||
<sqf> | |||
// 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 | |||
</sqf> | |||
</dl> |
Latest revision as of 19:42, 3 September 2024
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:
- Example 3:
Additional Information
- See also:
- a / b
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
- 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: