diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-05-17 22:55:31 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-17 22:55:31 +0200 |
| commit | c975d0d5e989cca6eff8e80ca8174f85eb4a3460 (patch) | |
| tree | 7aaf68ee71d81a1d71d7dcb1f928659bc6fa975d /src/geom/point.rs | |
| parent | 24c4a746bc68874f2d1b0d1b726596930acaadcf (diff) | |
Tidy up layouting code
Diffstat (limited to 'src/geom/point.rs')
| -rw-r--r-- | src/geom/point.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/geom/point.rs b/src/geom/point.rs index 5ed8bf1d..479bb137 100644 --- a/src/geom/point.rs +++ b/src/geom/point.rs @@ -21,7 +21,7 @@ impl Point { } /// Create an instance with two equal components. - pub fn uniform(value: Length) -> Self { + pub fn splat(value: Length) -> Self { Self { x: value, y: value } } } @@ -49,8 +49,8 @@ impl Switch for Point { fn switch(self, main: SpecAxis) -> Self::Other { match main { - SpecAxis::Horizontal => Gen::new(self.x, self.y), - SpecAxis::Vertical => Gen::new(self.y, self.x), + SpecAxis::Horizontal => Gen::new(self.y, self.x), + SpecAxis::Vertical => Gen::new(self.x, self.y), } } } |
