cross product was wrong 💀x7

This commit is contained in:
Quaternions 2023-11-08 16:45:13 -08:00
parent 176aaa069c
commit 2d14e8ac8e

View File

@ -647,9 +647,9 @@ impl Planar64Vec3{
#[inline] #[inline]
pub fn cross(&self,rhs:Self)->Planar64Vec3{ pub fn cross(&self,rhs:Self)->Planar64Vec3{
Planar64Vec3(glam::i64vec3( Planar64Vec3(glam::i64vec3(
(((self.0.y as i128)*(rhs.0.y as i128)-(self.0.z as i128)*(rhs.0.z as i128))>>32) as i64, (((self.0.y as i128)*(rhs.0.z as i128)-(self.0.z as i128)*(rhs.0.y as i128))>>32) as i64,
(((self.0.z as i128)*(rhs.0.z as i128)-(self.0.x as i128)*(rhs.0.x as i128))>>32) as i64, (((self.0.z as i128)*(rhs.0.x as i128)-(self.0.x as i128)*(rhs.0.z as i128))>>32) as i64,
(((self.0.x as i128)*(rhs.0.x as i128)-(self.0.y as i128)*(rhs.0.y as i128))>>32) as i64, (((self.0.x as i128)*(rhs.0.y as i128)-(self.0.y as i128)*(rhs.0.x as i128))>>32) as i64,
)) ))
} }
#[inline] #[inline]