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

Coerce Double To Currency Function
Windows API Class

Public Function CoerceDoubleToCurrency( _
    ByVal vValue As Double _
    ) As Currency

Coerce a Double value into a Currency value.
Return the Currency value whose bytes have the same in-memory representation as the Double value vValue.
Inverse of the CoerceCurrencyToDouble Function.

Examples:
    CoerceDoubleToCurrency(1) = 460718241880001.7408
    CoerceDoubleToCurrency(2) = 461168601842738.7904
    CoerceDoubleToCurrency(4.94065645841247E-320) = 1
    CoerceDoubleToCurrency(9.88131291682493E-320) = 2
See also:
    CoerceCurrencyToDouble Function
    MakeDouble Function
    CoerceToCurrency Function
Note: Similar to but faster than using the MakeDouble and CoerceToCurrency functions.

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