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

Rational Number Function
Math Arithmetic Class

Public Function RationalNumber( _
    ByVal vRational As Variant _
    ) As Variant

Return the integer part of the floating-point number vRational.
Converts vRational to X+Y/Z (where X, Y, and X are all integers) then returns X.
Same as calling the Visual Basic Fix function.

Examples:
    RationalDividend(45.75) = 3
    RationalDivisor(45.75) = 4
    RationalNumber(45.75) = 45
    RationalDividend(-45.75) = -3
    RationalDivisor(-45.75) = 4 ' #5
    RationalNumber(-45.75) = -45
See also:
    RationalDividend Function
    RationalDivisor Function
    RationalToFraction Function
vRational: Function returns the integer part of vRational. Function returns Null if vRational is Null or cannot be fixed up to a number.

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