Round
Returns the rounded value.
Variants
- Round(Duration duration, Duration significance)
- Round(Numeric number)
- Round(Numeric number, Number significance)
- Round(Time time, Duration significance)
Round(Duration duration, Duration significance)
Returns the multiple of the significance which is nearest to the duration.
Parameters
- duration
- The value you want to round.
- significance
- The multiple to which you want to round.
Returns
Duration
Examples
Round(Hours(7.3), Hours(5))
returns 5 hrsRound(Hours(7.5), Hours(5))
returns 10 hrsRound(Hours(-7.3), Hours(5))
returns -5 hrsRound(Hours(-7.5), Hours(5))
returns -10 hrsRound(Hours(7.3), Hours(-5))
returns 5 hrsRound(Hours(-7.3), Hours(-5))
returns -5 hrs
Round(Numeric number)
Returns the nearest integer to the number. The fraction .5 rounds up to the next greater integer.
Parameters
- number
- The value you want to round.
Returns
Numeric
Examples
Round(4.9)
returns 5Round(5.5)
returns 6Round(0.4)
returns 0Round(-4.9)
returns -5Round(-0.9)
returns -1
Round(Numeric number, Numeric significance)
Returns the multiple of significance which is nearest to the number.
Parameters
- number
- The value you want to round.
- significance
- The multiple to which you want to round.
Returns
Numeric
Examples
Round(7.63456, 0.01)
returns 7.63Round(0.86590, 0.01)
returns 0.87Round(7.63, 5)
returns 10Round(-7.63, 5)
returns -10Round(7.63, -5)
returns 10Round(-7.63, -5)
returns -10
Round(Time time, Duration significance)
Returns the multiple of the significance which is nearest to the time.
Parameters
- time
- The value you want to round.
- significance
- The multiple to which you want to round.
Returns
Time
Examples
Round(Time(21, 15), Hours(2))
returns 10:00 PM (or 22:00). 22:00 is the multiple of 2, which is nearest to the time 21:15