Skip to main content

IsScalable

Trait IsScalable 

Source
pub trait IsScalable {
    // Required method
    fn scale(&mut self, factor: Positive);
}
Expand description

IsScalable trait used for types that can have their size scaled by a factor

Required Methods§

Source

fn scale(&mut self, factor: Positive)

Should scale by the given factor. 0.5 -> half size, 2.0 double the size without moving the position/center

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§