Function round_to

Source
pub fn round_to(value: f64, granularity: f64) -> f64
Expand description

Rounds the value with the specified granularity.

ยงExamples

assert_eq!(akshually::math::round_to(1.93333, 0.05), 1.95);