save compiling state during refactor

This commit is contained in:
2025-04-18 14:01:51 +02:00
parent 2b5c1da484
commit e941a4973d
4 changed files with 98 additions and 92 deletions

View File

@@ -1,10 +1,10 @@
pub trait LimitPrecision {
fn to_precision(self, presision: i32) -> self;
fn to_precision(self, presision: i32) -> Self;
}
impl LimitPrecision for f32 {
fn to_precision(self, precision: i32) -> self {
fn to_precision(self, precision: i32) -> Self {
(self * (10_f32).powi(precision)).round() / (10_f32).powi(precision)
}
}