From 6b725e90add8279313ab0e39269a789ee1faa896 Mon Sep 17 00:00:00 2001 From: Corwin Kuiper Date: Sun, 6 Jun 2021 18:30:42 +0100 Subject: [PATCH] stop using references --- agb/src/number.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/agb/src/number.rs b/agb/src/number.rs index c710b983..73f2c0f6 100644 --- a/agb/src/number.rs +++ b/agb/src/number.rs @@ -221,12 +221,12 @@ impl Num { self.0 } - pub fn trunc(&self) -> I { + pub fn trunc(self) -> I { self.0 / (I::one() << N) } - pub fn rem_euclid(&self, rhs: Self) -> Self { - let r = *self % rhs; + pub fn rem_euclid(self, rhs: Self) -> Self { + let r = self % rhs; if r < I::zero().into() { if rhs < I::zero().into() { r - rhs @@ -238,11 +238,11 @@ impl Num { } } - pub fn floor(&self) -> I { + pub fn floor(self) -> I { self.0 >> N } - pub fn frac(&self) -> I { + pub fn frac(self) -> I { self.0 & ((I::one() << N) - I::one()) }