summaryrefslogtreecommitdiff
path: root/src/geom/fraction.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-04-08 15:08:26 +0200
committerLaurenz <laurmaedje@gmail.com>2022-04-08 15:45:14 +0200
commit712c00ecb72b67da2c0788e5d3eb4dcc6366b2a7 (patch)
treef5d7ef4341a4728c980d020cc173fa6bb70feaff /src/geom/fraction.rs
parent977ac77e6a3298be2644a8231e93acbef9f7f396 (diff)
Em units
Diffstat (limited to 'src/geom/fraction.rs')
-rw-r--r--src/geom/fraction.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/geom/fraction.rs b/src/geom/fraction.rs
index 2f33a134..f7188603 100644
--- a/src/geom/fraction.rs
+++ b/src/geom/fraction.rs
@@ -30,8 +30,8 @@ impl Fraction {
Self::new(self.get().abs())
}
- /// Resolve this fraction's share in the remaining space.
- pub fn resolve(self, total: Self, remaining: Length) -> Length {
+ /// Determine this fraction's share in the remaining space.
+ pub fn share(self, total: Self, remaining: Length) -> Length {
let ratio = self / total;
if ratio.is_finite() && remaining.is_finite() {
ratio * remaining