diff options
| author | Martin Haug <mhaug@live.de> | 2021-05-26 22:52:02 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-26 22:57:29 +0200 |
| commit | e27f6c10146240a6c8b92930b27948083f08c9b5 (patch) | |
| tree | 4b1d1fb574dfa164a76f758f989af04b8897cf6c /src/geom/point.rs | |
| parent | 14f093bfee3d0871d9796a0dcaf1648b76010930 (diff) | |
Add hash impls for all nodes
This prepares the incremental PR.
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'src/geom/point.rs')
| -rw-r--r-- | src/geom/point.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/geom/point.rs b/src/geom/point.rs index 479bb137..babbdfef 100644 --- a/src/geom/point.rs +++ b/src/geom/point.rs @@ -13,7 +13,9 @@ pub struct Point { impl Point { /// The origin point. - pub const ZERO: Self = Self { x: Length::ZERO, y: Length::ZERO }; + pub 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 { |
