From ce30e3f6661d5a386b2b12bae73980ec76928d47 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 10 Jun 2016 17:59:33 +0200 Subject: Normalized Vector3 API to use the same capitalization as all else. --- src/Vector3.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/Vector3.h') diff --git a/src/Vector3.h b/src/Vector3.h index 19ab0b021..4fa9ff46c 100644 --- a/src/Vector3.h +++ b/src/Vector3.h @@ -107,19 +107,20 @@ public: return x * a_Rhs.x + y * a_Rhs.y + z * a_Rhs.z; } - inline void abs() + /** Updates each coord to its absolute value */ + inline void Abs() { x = (x < 0) ? -x : x; y = (y < 0) ? -y : y; z = (z < 0) ? -z : z; } - // We can't use a capital letter, because we wouldn't be able to call the normal Clamp function. - inline void clamp(T a_Min, T a_Max) + /** Clamps each coord into the specified range. */ + inline void Clamp(T a_Min, T a_Max) { - x = Clamp(x, a_Min, a_Max); - y = Clamp(y, a_Min, a_Max); - z = Clamp(z, a_Min, a_Max); + x = ::Clamp(x, a_Min, a_Max); + y = ::Clamp(y, a_Min, a_Max); + z = ::Clamp(z, a_Min, a_Max); } inline Vector3 Cross(const Vector3 & a_Rhs) const -- cgit v1.2.3