diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-11-22 15:50:35 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-11-22 15:50:35 +0100 |
| commit | 02f114d072ffba72c5b18953f2959eac4dee1612 (patch) | |
| tree | f3e62020a572f22d98d853649237472c2fd1d407 /src/geom/point.rs | |
| parent | 0a974d86ba921af781a6c9d75961b92351a5f28e (diff) | |
Remove decorum
Diffstat (limited to 'src/geom/point.rs')
| -rw-r--r-- | src/geom/point.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/geom/point.rs b/src/geom/point.rs index 8ab043c3..7c11e81b 100644 --- a/src/geom/point.rs +++ b/src/geom/point.rs @@ -11,22 +11,22 @@ pub struct Point { impl Point { /// The origin point. - pub fn zero() -> Self { + pub const fn zero() -> Self { Self { x: Length::zero(), y: Length::zero() } } /// Create a new point from x and y coordinate. - pub fn new(x: Length, y: Length) -> Self { + pub const fn new(x: Length, y: Length) -> Self { Self { x, y } } /// Create an instance with two equal components. - pub fn splat(value: Length) -> Self { + pub const fn splat(value: Length) -> Self { Self { x: value, y: value } } /// Convert to the generic representation. - pub fn to_gen(self, block: SpecAxis) -> Gen<Length> { + pub const fn to_gen(self, block: SpecAxis) -> Gen<Length> { match block { SpecAxis::Horizontal => Gen::new(self.y, self.x), SpecAxis::Vertical => Gen::new(self.x, self.y), |
