Function apply_factor

Source
pub fn apply_factor<T, const DECIMALS: u8>(value: &T, factor: &T) -> Option<T>
where T: FixedPointOps<DECIMALS>,
Expand description

Apply factor using this formula: A * x.

Assuming that value and factor are a fixed-point decimals, but they do not need to be of the same decimals. The const type DECIMALS is the decimals of factor.