From: Tomas Wenström Date: Sat, 23 Jan 2021 14:44:51 +0000 (+0100) Subject: normalize() to normalized() X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=93fc5734baf7537eae88e3b1a418ceb868862f2b;p=kaka%2Frust-sdl-test.git normalize() to normalized() --- 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 }