blob: 450e61e8d9b059470ae5c6fb00aaf6fc7e73e7bc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
use crate::math::Vec2;
/// Trait representing something that covers an area and that can be resized accordingly.
pub trait Scaleable {
/// Scale the object by the specified amount in horizontal and vertical direction (right and
/// downwards).
///
/// # Panics
/// If at least one of the dimensions is zero or less, the object cannot be scaled and panics.
fn scale(&mut self, by: &Vec2<f64>);
}
|