<-- Previous || Up || Next -->

Fix Real Function
Math Reals Class

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

"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.

Examples:
    FixReal(2.6) = 2
    FixReal(2) = 2
    FixReal(.4) = 0
    FixReal(-.4) = 0
    FixReal(-2.6) = -2
    FixReal(-2.6E4) = -26000
See also:
    FixRealVerify Subroutine
    FractionalPart Function
    Fix Function (Visual Basic)
Note: The FractionalPart function returns the fractional part of a number.

vX: The real number whose integer part is returned. Function returns Null if vX is Null or cannot be fixed up to a number.
Note: This function is similar to the Visual Basic Fix function, except that this one supports three-valued logic.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.