Simplify image rotation API and its internals
This commit is contained in:
parent
09a6bcfffc
commit
a57313b23e
23 changed files with 219 additions and 225 deletions
|
|
@ -227,3 +227,19 @@ 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue