Add UNIT constant to Size

This commit is contained in:
Héctor Ramón Jiménez 2020-05-01 04:30:54 +02:00
parent 377ead93d6
commit 980ac6c2a4

View File

@ -15,6 +15,11 @@ impl Size {
/// [`Size`]: struct.Size.html
pub const ZERO: Size = Size::new(0., 0.);
/// A [`Size`] with a width and height of 1 unit.
///
/// [`Size`]: struct.Size.html
pub const UNIT: Size = Size::new(1., 1.);
/// A [`Size`] with infinite width and height.
///
/// [`Size`]: struct.Size.html