diff options
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 9bb91956..420c90bc 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -202,20 +202,20 @@ impl LayoutAxes { /// the layouting axes, that is: /// - The x coordinate describes the primary axis instead of the horizontal one. /// - The y coordinate describes the secondary axis instead of the vertical one. - pub fn generalize(&self, space: Size2D) -> Size2D { + pub fn generalize(&self, size: Size2D) -> Size2D { if self.primary.axis.is_horizontal() { - space + size } else { - Size2D { x: space.y, y: space.x } + Size2D { x: size.y, y: size.x } } } /// Returns the specialized version of this generalized Size2D. /// (Inverse to `generalized`). - pub fn specialize(&self, space: Size2D) -> Size2D { + pub fn specialize(&self, size: Size2D) -> Size2D { // In fact, generalized is its own inverse. For reasons of clarity // at the call site, we still have this second function. - self.generalize(space) + self.generalize(size) } /// The position of the anchor specified by the two aligned axes |
