From 823a16e08da9f86f4809f42c0868e5f3da6014d5 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 6 Nov 2023 15:58:06 -0800 Subject: [PATCH] fix determinant --- src/integer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/integer.rs b/src/integer.rs index 9d8f9d6..46d2d67 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -878,14 +878,14 @@ impl Planar64Mat3{ } #[inline] pub const fn inverse(&self)->Self{ - let det= + let det=( -self.x_axis.0.z as i128*self.y_axis.0.y as i128*self.z_axis.0.x as i128 +self.x_axis.0.y as i128*self.y_axis.0.z as i128*self.z_axis.0.x as i128 +self.x_axis.0.z as i128*self.y_axis.0.x as i128*self.z_axis.0.y as i128 -self.x_axis.0.x as i128*self.y_axis.0.z as i128*self.z_axis.0.y as i128 -self.x_axis.0.y as i128*self.y_axis.0.x as i128*self.z_axis.0.z as i128 +self.x_axis.0.x as i128*self.y_axis.0.y as i128*self.z_axis.0.z as i128 - ; + )>>32; Self{ x_axis:Planar64Vec3::raw((((-(self.y_axis.0.z as i128*self.z_axis.0.y as i128)+self.y_axis.0.y as i128*self.z_axis.0.z as i128)<<32)/det) as i64,(((self.x_axis.0.z as i128*self.z_axis.0.y as i128-self.x_axis.0.y as i128*self.z_axis.0.z as i128)<<32)/det) as i64,(((-(self.x_axis.0.z as i128*self.y_axis.0.y as i128)+self.x_axis.0.y as i128*self.y_axis.0.z as i128)<<32)/det) as i64), y_axis:Planar64Vec3::raw((((self.y_axis.0.z as i128*self.z_axis.0.x as i128-self.y_axis.0.x as i128*self.z_axis.0.z as i128)<<32)/det) as i64,(((-(self.x_axis.0.z as i128*self.z_axis.0.x as i128)+self.x_axis.0.x as i128*self.z_axis.0.z as i128)<<32)/det) as i64,(((self.x_axis.0.z as i128*self.y_axis.0.x as i128-self.x_axis.0.x as i128*self.y_axis.0.z as i128)<<32)/det) as i64),