Number Object

The number object represents a numeric value and includes arithmetical functions and a function to convert to a string type

Name and Parameters Description Return Type Usage Examples
Add(number x) Adds the specified number to the current number and returns the result Number $Utils.GetNumber(99).Add(1)$

$Utils.GetNumber(99).Add(1.99)$
100

100.99
Ceiling() Returns the smallest integer greater than or equal to the current decimal number Integer $Utils.GetNumber(99.5).Ceiling()$ 100
Decrement() Decrements the current number by one Number $Utils.GetNumber(99).Decrement()$ 98
Divide(number x) Divides the current number by the specified number and returns the result Number $Utils.GetNumber(99).Divide(9)$

$Utils.GetNumber(99).Divide(8)$
11

12.375
Floor() Returns the largest integer less than or equal to the current decimal number Integer $Utils.GetNumber(99.5).Floor()$ 99
Increment() Increments the current number by one Number $Utils.GetNumber(99).Increment()$ 100
IntegerDivide(integer x) Divides the current integer by the specified integer and returns an integer result Integer $Utils.GetNumber(99).IntegerDivide(8)$ 12
Modulus(number x) Returns the remainder after dividing the current number by the specified number Integer $Utils.GetNumber(99).Modulus(8)$ 3
Multiply(number x) Multiplies the current number by the specified number and returns the result Number $Utils.GetNumber(99).Multiply(2)$

$Utils.GetNumber(99).Multiply(2.5)$
198

247.5
Round() Rounds the current decimal number to the nearest integer Integer $Utils.GetNumber(99.5).Round()$ 100
Subtract(number x) Subtracts the specified number from the current number and returns the result Number $Utils.GetNumber(99).Subtract(1)$

$Utils.GetNumber(99).Subtract(9.9)$
98

89.1
ToString() Parses current number to a string, allowing string operations and functions String $Utils.GetNumber(99).ToString().Length$ 2