Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

scale_by_ratio

Multiplies an amount by a ratio.

Semantic wrapper around multiplication for clarity in DeFi contexts.

Fully qualified path: cairo_fp::f128::math::ratio::scale_by_ratio

fn scale_by_ratio(amount: Fixed, ratio: Fixed) -> Fixed