diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-06-03 21:01:42 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-06-03 21:01:42 +0200 |
commit | cee4589ff116394b94643b37e251c2be67fe369c (patch) | |
tree | 66a1b9d1799b7072382f77abe1bdcee0bf1303b6 /src/geometry.rs | |
parent | 7a8fe60eb17d66771b153280b76546bcf46a9c7e (diff) |
Added a custom cursor
Diffstat (limited to 'src/geometry.rs')
-rw-r--r-- | src/geometry.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/geometry.rs b/src/geometry.rs index f84a973..6f7f658 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -7,6 +7,9 @@ pub struct Vec2d { } impl Vec2d { + pub fn new(x: f64, y: f64) -> Vec2d { + Vec2d {x, y} + } pub fn distance(&self, other: Vec2d) -> f64 { self.distance_squared(other).sqrt() } |