Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

percentage_change

Calculates the percentage change between two values.

Returns (new - old) / old as a ratio. Multiply by 100 to get percentage.

Returns

None if old is zero

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

fn percentage_change(old: Fixed, new: Fixed) -> Option<Fixed>