Add a bunch of .round()s before conversions

Previously this was leading to inconsistencies when using f32 v.s. f64
This commit is contained in:
2020-12-17 15:09:53 -08:00
parent 75fde43aa7
commit d8ae766099
5 changed files with 12 additions and 9 deletions

View File

@@ -208,6 +208,9 @@ impl Vec3 {
self.with_mag(1.0)
}
}
pub fn round(&self) -> Vec3 {
Self::new(self.x().round(), self.y().round(), self.z().round())
}
}
impl Into<(Flt, Flt, Flt)> for Vec3 {