Skip to content

Commit

Permalink
Reapply "Make Point trait impl a blanket impl"
Browse files Browse the repository at this point in the history
This reverts commit d344566.
  • Loading branch information
JohnTheCoolingFan committed Feb 24, 2024
1 parent 5cc66be commit 5aea5cc
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions crates/bevy_math/src/cubic_splines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ pub trait Point:
{
}

impl Point for Vec3 {}
impl Point for Vec3A {}
impl Point for Vec2 {}
impl Point for f32 {}
impl<T> Point for T where
T: Mul<f32, Output = Self>
+ Div<f32, Output = Self>
+ Add<Self, Output = Self>
+ Sub<Self, Output = Self>
+ Add<f32, Output = Self>
+ Sum
+ Default
+ Debug
+ Clone
+ PartialEq
+ Copy
{
}

/// A spline composed of a single cubic Bezier curve.
///
Expand Down

0 comments on commit 5aea5cc

Please sign in to comment.