Link Search Menu Expand Document

Number.Round()

Round(value, places?) => Returns a number rounded to the specified number of places. If not specified it will be rounded to an integer.
Name Type Description
value Number The number to be rounded
places? Number(Integer) Number of places to round value
Round(1.657); => 2
Round(-164.647, 2); => -164.65

Number.Abs()

Abs(value) => Returns the absolute value of the value
Name Type Description
value Number The number to find the absolute value of
Abs(-5); => 5
Abs(5); => 5

Number.Average()

Average(values) => Returns the average of a list of numbers
Name Type Description
value List or Number The list of numbers to average
Average(List(1, 2, 3));

would yield: the number 2

Average(1, 2, 3);

would yield: the number 2

Note Average will calculate the average of all Numbers in the list; other data types will be ignored. If no numbers in list, Average will return null.

Number.Sum()

Sum(values) => Returns the sum of a list of numbers
Name Type Description
value List or Number The list of numbers to sum
Sum(List(1, 2, 3));

would yield: the number 6

Sum(1, 2, 3);

would yield: the number 6

Note Sum will calculate the sum of all Numbers in the list; other data types will be ignored. If no numbers in list, Sum will return null.

Number.Ceiling()

Ceiling(value, places?) => Returns the value rounded upward to the given number of places
Name Type Description
value Number The number to be rounded up
places? Number(Integer) Number of places to round value
Ceiling(7.1); => 8
Ceiling(-5.6); => -5

Number.Floor()

Floor(value, places?) => Returns the value rounded down to the given number of places
Name Type Description
value Number The number to be rounded down
places? Number(Integer) Number of places to round value
Floor(7.1); => 7
Floor(-5.6); => -6

Number.Random()

Random(min?, max?) => Returns a random integer number within given range, if specified
Name Type Description
min? Number(Integer) Beginning of range for random number
Max? Number(Integer) End of range for random number
Random(); => returns a random non-negative number
Random(10); => returns a random non-negative number less than 10
Random(5, 10); => returns a random integer >= 5 and < 10

Note Random can take 0, 1, or 2 values

  • Random() => Returns a non-negative random integer
  • Random(max) => Returns a non-negative random integer that is less than max
  • Random(min, max) => Returns a random integer within the specified range