Function Math Reals Class

FixReal

"Fixed Part Of Real Number" Integer Part of a real number. Return the largest integer less than or equal to vNumber when vNumber is positive. Return the smallest integer greater than or equal to vNumber when vNumber is negative. Same as the IntegerPart function.

Signature (Visual Basic / VBA)

Public Function FixReal( _
    ByVal vX As Variant _
    ) As Variant

Code Example

    FixReal(2.6) = 2
    FixReal(2) = 2
    FixReal(.4) = 0
    FixReal(-.4) = 0
    FixReal(-2.6) = -2
    FixReal(-2.6E4) = -26000

Parameters

Parameter Description
vX The real number whose integer part is returned. Function returns Null if vX is Null or cannot be fixed up to a number.

Notes & Version History

Note The FractionalPart function returns the fractional part of a number.
Note This function is similar to the Visual Basic Fix function, except that this one supports three-valued logic.