Skip to content

Commit

Permalink
Merge branch 'main' into component_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
ecoskey authored Mar 30, 2024
2 parents 29e65a3 + 97f0555 commit b34093c
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions crates/bevy_math/src/common_traits.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use glam::{Quat, Vec2, Vec3, Vec3A, Vec4};
use glam::{Vec2, Vec3, Vec3A, Vec4};
use std::fmt::Debug;
use std::ops::{Add, Div, Mul, Neg, Sub};

Expand Down Expand Up @@ -47,11 +47,6 @@ pub trait VectorSpace:
}
}

// This is cursed and we should probably remove Quat from these.
impl VectorSpace for Quat {
const ZERO: Self = Quat::from_xyzw(0., 0., 0., 0.);
}

impl VectorSpace for Vec4 {
const ZERO: Self = Vec4::ZERO;
}
Expand Down Expand Up @@ -107,18 +102,6 @@ pub trait NormedVectorSpace: VectorSpace {
}
}

impl NormedVectorSpace for Quat {
#[inline]
fn norm(self) -> f32 {
self.length()
}

#[inline]
fn norm_squared(self) -> f32 {
self.length_squared()
}
}

impl NormedVectorSpace for Vec4 {
#[inline]
fn norm(self) -> f32 {
Expand Down

0 comments on commit b34093c

Please sign in to comment.