Math Functions

Rita Pang
Rita Pang
  • Updated

Refer to the below for a list of math functions available within Alaya Connector.

average ([array of values]) average(value1; [value2], ...)

This function returns the average value of the numeric values in a specific array, or the individually entered average value of numerical values.

ceil (number)

This function returns the smallest integer greater than or equal to a specified number.

ceil(1.2)
= 2
ceil(4)
= 4

floor (number)

This function returns the largest integer less than or equal to a specified number.

floor(1.2)
= 1
floor(1.9)
= 1
floor(4)
= 4

formatNumber (number; decimalPOINTS; [decimalSeparator]; [thousandsSeparator])

This function returns a number in the requested format. By default, decimal and thousands will be represented using the metric system, where decimals are represented by "." and thousands by ",".

formatNumber(123456789;3;,;.)
= 123.456.789,000

max ([array of values]), max(value1;value2; ...)

This function returns the largest number in a specified array, or the largest number among numbers entered individually.

min ([array of values]), min(value1; value2; ...)

This function returns the smallest number in a specified array, or the smallest number among numbers entered individually.

parseNumber (number; decimal separator)

This function parses a string with a number and returns the number. Example: parseNumber(1 756,456;,)

round (number)

This function rounds a numeric value to the nearest integer.

round(1.2)
= 1
round(1.5)
= 2
round(1.7)
= 2
round(2)
= 2

sum ([array of values]), sum(value1; value2; ...)

This function returns the sum of the values in a specified array, or the sum of numbers entered individually.

 

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.