[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Round to the specified number of digits (rounding up if needed)
Source position: math.pp line 296
function SimpleRoundTo( |
const AValue: Single; |
const Digits: TRoundToRange = - 2 |
):Single; |
const AValue: Double; |
const Digits: TRoundToRange = - 2 |
):Double; |
const AValue: Extended; |
const Digits: TRoundToRange = - 2 |
):Extended; |
SimpleRoundTo rounds the specified float AValue to the specified number of digits using symmetric arithmetic rounding (rounding up for positive or down for negative) and returns the result. This result is accurate to "10 to the power Digits". It uses the standard Round function for this.
An exception may occur if the value AValue is not inside a valid integer (or Int64) range.
|
Range with valid range of digits in RoundTo |
|
|
Round to the specified number of digits |