Add UNIT
constant to Size
This commit is contained in:
parent
377ead93d6
commit
980ac6c2a4
@ -15,6 +15,11 @@ impl Size {
|
|||||||
/// [`Size`]: struct.Size.html
|
/// [`Size`]: struct.Size.html
|
||||||
pub const ZERO: Size = Size::new(0., 0.);
|
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.
|
/// A [`Size`] with infinite width and height.
|
||||||
///
|
///
|
||||||
/// [`Size`]: struct.Size.html
|
/// [`Size`]: struct.Size.html
|
||||||
|
Loading…
Reference in New Issue
Block a user