Allow dividing a Vector2F by an f32 value.

This commit is contained in:
Josh Matthews 2020-04-07 15:36:46 -04:00 committed by GitHub
parent 43adc9c24a
commit 3a8339fece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -246,6 +246,14 @@ impl Div<Vector2F> for Vector2F {
}
}
impl Div<f32> for Vector2F {
type Output = Vector2F;
#[inline]
fn div(self, other: f32) -> Vector2F {
self / Vector2F::splat(other)
}
}
impl Neg for Vector2F {
type Output = Vector2F;
#[inline]