summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/size.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/size.rs b/core/src/size.rs
index 4276f05f..a02299e8 100644
--- a/core/src/size.rs
+++ b/core/src/size.rs
@@ -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