IMath.FloorI

Fore Syntax

FloorI(Value: Integer; Precision: Integer): Integer;

Fore.NET Syntax

FloorI(Value: integer; Precision: integer): integer;

Parameters

Value. Rounded integer.

Precision. An integermultiple, to which it is required to round.

Description

The FloorI method rounds down to the nearest integer that is multiple of precision.

Comments

If the number and precision are positive, the value is rounded down, if the number and precision are negative, the value is rounded up. If a number is negative and precision is positive, the value is rounded down.

Fore Example

To execute the example, add a link to the MathFin system assembly.

Sub UserProc;
Var r1,r2,r3:Integer;
Begin
    r1 := math.FloorI(72);
    Debug.WriteLine(r1);
    r2:= math.FloorI(-8,-3);
    Debug.WriteLine(r2);
    r3:= math.FloorI(-11,6);
    Debug.WriteLine(r3);
End Sub UserProc;

After executing the example the console window displays rounding results:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    
r1, r2, r3: integer;
    Math: MathClass = New MathClass();
Begin
    r1 := Math.FloorI(7,2);
    System.Diagnostics.Debug.WriteLine(r1);

    r2 := Math.FloorI(-8,-3);
    System.Diagnostics.Debug.WriteLine(r2);
    r3 := Math.FloorI(-11,6);
    System.Diagnostics.Debug.WriteLine(r3);
End Sub;

See also:

IMath