From 93fc5734baf7537eae88e3b1a418ceb868862f2b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomas=20Wenstr=C3=B6m?= Date: Sat, 23 Jan 2021 15:44:51 +0100 Subject: [PATCH] normalize() to normalized() --- src/common.rs | 2 +- src/core/controller.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.rs b/src/common.rs index 0d82903..591d781 100644 --- a/src/common.rs +++ b/src/common.rs @@ -18,7 +18,7 @@ impl Point2D { ((self.x * self.x) + (self.y * self.y)).sqrt() } - pub fn normalize(&self) -> Self { + pub fn normalized(&self) -> Self { let l = self.length(); Self { x: self.x / l, diff --git a/src/core/controller.rs b/src/core/controller.rs index 9d23257..23af1b2 100644 --- a/src/core/controller.rs +++ b/src/core/controller.rs @@ -95,7 +95,7 @@ impl Stick { pub fn to_point(&self) -> Point2D { let p = point!(self.x as f64, self.y as f64); if p.length() > 1.0 { - p.normalize() + p.normalized() } else { p } -- 2.11.0