diff options
| author | 2020-03-20 04:08:18 +0100 | |
|---|---|---|
| committer | 2020-03-20 04:08:18 +0100 | |
| commit | 18f016cba70bf59095ae65ce0e289d80a548ae58 (patch) | |
| tree | 42a6b91b3409733575c0812bc8d1041f8aa99d13 /core | |
| parent | 420275793e04b41254bacdaedd8ca60fb2ffe63f (diff) | |
| download | iced-18f016cba70bf59095ae65ce0e289d80a548ae58.tar.gz iced-18f016cba70bf59095ae65ce0e289d80a548ae58.tar.bz2 iced-18f016cba70bf59095ae65ce0e289d80a548ae58.zip  | |
Use `f32::hypot` in `Point::distance`
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/point.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/point.rs b/core/src/point.rs index b855cd91..43ee2143 100644 --- a/core/src/point.rs +++ b/core/src/point.rs @@ -30,7 +30,7 @@ impl Point {          let a = self.x - to.x;          let b = self.y - to.y; -        f32::sqrt(a * a + b * b) +        a.hypot(b)      }  }  | 
