This commit is contained in:
iris committed 2025-12-07 00:32:38 -05:00
1 parent 62aa02847a
commit 38266debb6
7 files changed
+68 -32

No files matched your search

+11
View File
@@ -41,6 +41,11 @@ impl Size {
y: Len::ZERO,
};
pub const REST: Self = Self {
x: Len::REST,
y: Len::REST,
};
pub fn abs(v: Vec2) -> Self {
Self {
x: Len::abs(v.x),
@@ -97,6 +102,12 @@ impl Len {
rest: 0.0,
};
pub const REST: Self = Self {
abs: 0.0,
rel: 0.0,
rest: 1.0,
};
pub fn apply_rest(&self) -> UiScalar {
UiScalar {
rel: self.rel + if self.rest > 0.0 { 1.0 } else { 0.0 },