From bf6f37fa007429770a3ef0dab4a47b5d69c7a9ab Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 13 Oct 2023 16:28:09 -0700 Subject: [PATCH] fixings for physics --- src/integer.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/integer.rs b/src/integer.rs index c63cede..00e92ec 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -234,7 +234,7 @@ impl Ratio64Vec2{ Self{x,y} } #[inline] - pub fn mul_int(self,rhs:glam::I64Vec2)->glam::I64Vec2{ + pub fn mul_int(&self,rhs:glam::I64Vec2)->glam::I64Vec2{ glam::i64vec2( self.x.mul_int(rhs.x), self.y.mul_int(rhs.y), @@ -654,6 +654,17 @@ impl std::ops::SubAssign for Planar64Vec3{ *self=*self-rhs } } +impl std::ops::Mul for Planar64Vec3{ + type Output=Planar64Vec3; + #[inline] + fn mul(self, rhs: Planar64Vec3) -> Self::Output { + Planar64Vec3(glam::i64vec3( + (((self.0.x as i128)*(rhs.0.x as i128))>>64) as i64, + (((self.0.y as i128)*(rhs.0.y as i128))>>64) as i64, + (((self.0.z as i128)*(rhs.0.z as i128))>>64) as i64 + )) + } +} impl std::ops::Mul for Planar64Vec3{ type Output=Planar64Vec3; #[inline]