mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
23 lines
416 B
Plaintext
23 lines
416 B
Plaintext
/*
|
|
Name: FUNC(toNumber)
|
|
|
|
Author(s):
|
|
Garth de Wet (LH)
|
|
|
|
Description:
|
|
Takes a string/number and returns the number.
|
|
|
|
Parameters:
|
|
0: TYPE - Value to attempt to convert to number or if number simply return number.
|
|
|
|
Returns:
|
|
NUMBER
|
|
|
|
Example:
|
|
_number = ["102"] call FUNC(toNumber);
|
|
*/
|
|
if (TYPENAME(_this select 0) == "SCALAR")exitWith {
|
|
(_this select 0)
|
|
};
|
|
|
|
(parseNumber (_this select 0)) |