Public Function PreviousEven( _ ByVal vX As Variant _ ) As Variant
PreviousEven(1) = 0 PreviousEven(2) = 0 PreviousEven(3) = 2 PreviousEven(22.4) = 22 PreviousEven(-1.7) = -2 PreviousEven(-6.5) = -8 PreviousEven(-7.8) = -8See also:
PreviousEvenSample Subroutine PreviousOdd Function PreviousNumber Function NextEven FunctionvX: Number which is rounded-down to the previous even number (i.e. 2, 4, 6, -2, -4, -6, etc.). Function returns Null if vX is Null or cannot be fixed up to a number.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.