The FLOOR function in ProBuilder language is used to round down a numeric value to the nearest integer or to a specified number of decimal places. This function is particularly useful for data manipulation where you need to standardize numerical values to a consistent format or when performing mathematical calculations that require integer inputs.
floor(var, digits)
a = 3.756
b = floor(a) // b will be 3
c = floor(a, 1) // c will be 3.7
In this example, variable a has a value of 3.756. When using the FLOOR function without specifying the number of digits, b is rounded down to 3. When specifying one digit after the decimal point, c is rounded down to 3.7.
The FLOOR function is essential when dealing with financial calculations where values need to be adjusted to specific denominations, or when preparing data for graphical representation where uniformity in data points is required. Understanding how to manipulate the number of decimal places allows for greater control over the precision of your calculations and outputs.