Arma 3 Scripting

finite

  • Arma 3 v0.50
  • First in Armed Assault v1.00

Command · Markdown · JSON · original wiki page

Description

Returns true if the provided number is finite (not infinite and a valid number).

Note

  • Maximum finite Number : 3.40282e+38
  • Minimum finite Number : -3.40282e+38

Syntax

finite number

Parameters:

Returns: Boolean

Examples

Example 1

finite 123; // returns true

Example 2

finite log -1; // returns false

Example 3

if (not finite log -1) then { hint "Infinite" };

See also

a / b

Community notes

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