[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'math' (#rtl)

SimpleRoundTo

Round to the specified number of digits (rounding up if needed)

Declaration

Source position: math.pp line 263

function SimpleRoundTo(

  const AValue: Single;

  const Digits: TRoundToRange = -2

):Single;

function SimpleRoundTo(

  const AValue: Double;

  const Digits: TRoundToRange = -2

):Double;

function SimpleRoundTo(

  const AValue: Extended;

  const Digits: TRoundToRange = -2

):Extended;

Description

SimpleRoundTo rounds the specified float AValue to the specified number of digits, but rounds up, and returns the result. This result is accurate to "10 to the power Digits". It uses the standard Round function for this.

Errors

An exception may occur if the value AValue is not inside a valid integer (or Int64) range.

See also

TRoundToRange

  

Range with valid range of digits in RoundTo

RoundTo

  

Round to the specified number of digits


Documentation generated on: Mar 17 2017