diff --git a/src/vector.rs b/src/vector.rs index 85b4e31..2219a47 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -177,8 +177,7 @@ pub impl Vec2: NumericVector { pub impl Vec2: GeometricVector { #[inline(always)] pure fn length2() -> T { - self[0] * self[0] + - self[1] * self[1] + self.dot(&self) } #[inline(always)] @@ -368,9 +367,7 @@ pub impl Vec3: NumericVector { pub impl Vec3: GeometricVector { #[inline(always)] pure fn length2() -> T { - self[0] * self[0] + - self[1] * self[1] + - self[2] * self[2] + self.dot(&self) } #[inline(always)] @@ -565,10 +562,7 @@ pub impl Vec4: NumericVector { pub impl Vec4: GeometricVector { #[inline(always)] pure fn length2() -> T { - self[0] * self[0] + - self[1] * self[1] + - self[2] * self[2] + - self[3] * self[3] + self.dot(&self) } #[inline(always)]