Skip to main content

f2du

Macro f2du 

Source
macro_rules! f2du {
    ($val:expr) => { ... };
}
Expand description

Converts an f64 value to Decimal without error checking.

This macro converts an f64 floating-point value to a Decimal type. It’s an “unchecked” version that doesn’t handle potential conversion errors.

§Parameters

  • $val - An f64 value to be converted to Decimal

§Example

use optionstratlib_core::f2du;
let float_value = 10.5;
let decimal_value = f2du!(float_value);