cleanup main and network state handling

This commit is contained in:
2025-05-27 23:47:14 +02:00
parent 4f4d15e4a4
commit 3fe9aaeb6f
4 changed files with 204 additions and 145 deletions

View File

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