Remove Mul<Vector> and Div implementations for Rectangle
This commit is contained in:
parent
6f9b7a9005
commit
e51d7c723c
1 changed files with 0 additions and 45 deletions
|
|
@ -354,19 +354,6 @@ impl std::ops::Mul<f32> for Rectangle<f32> {
|
|||
}
|
||||
}
|
||||
|
||||
impl std::ops::Div<f32> for Rectangle<f32> {
|
||||
type Output = Self;
|
||||
|
||||
fn div(self, scale: f32) -> Self {
|
||||
Self {
|
||||
x: self.x / scale,
|
||||
y: self.y / scale,
|
||||
width: self.width / scale,
|
||||
height: self.height / scale,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Rectangle<u32>> for Rectangle<f32> {
|
||||
fn from(rectangle: Rectangle<u32>) -> Rectangle<f32> {
|
||||
Rectangle {
|
||||
|
|
@ -407,35 +394,3 @@ where
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> std::ops::Mul<Vector<T>> for Rectangle<T>
|
||||
where
|
||||
T: std::ops::Mul<Output = T> + Copy,
|
||||
{
|
||||
type Output = Rectangle<T>;
|
||||
|
||||
fn mul(self, scale: Vector<T>) -> Self {
|
||||
Rectangle {
|
||||
x: self.x * scale.x,
|
||||
y: self.y * scale.y,
|
||||
width: self.width * scale.x,
|
||||
height: self.height * scale.y,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> std::ops::Div<Vector<T>> for Rectangle<T>
|
||||
where
|
||||
T: std::ops::Div<Output = T> + Copy,
|
||||
{
|
||||
type Output = Rectangle<T>;
|
||||
|
||||
fn div(self, scale: Vector<T>) -> Self {
|
||||
Rectangle {
|
||||
x: self.x / scale.x,
|
||||
y: self.y / scale.y,
|
||||
width: self.width / scale.x,
|
||||
height: self.height / scale.y,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue