Skip to main content

Overview

This function returns the number rounded to the number of decimal points.

Parameters

roundTo(number, beforeDecimal, afterDecimal)
  • Number: The number to round.
  • Before Decimal: Number of digits before the decimal point.
  • After Decimal: Number of digits after the decimal point.

Example

roundTo(3.14159, 1, 2)
Returns 3.14.
I