|
||||||
|
Relate Components | RelateScript | BlueStep.js |
round(...)
The round(...) function has two variations, not counting syntax variations. It rounds a number to the nearest whole number or to the nearest multiple of another number. If the roundTo value is an Integer, or if it is omitted, the result is an Integer, otherwise the result is a Float value. If the number being rounded is null the result is null. Syntax:
Example: hours = (endTime - startTime).totalHours.round(0.25); To compute the pay for that time period, rounded to the nearest penny, you might use: pay = round(hours * hourlyPay, 0.01);
|