diff --git a/include/Nazara/Math/Sphere.hpp b/include/Nazara/Math/Sphere.hpp index 85a9ae8c7..f3cc1251e 100644 --- a/include/Nazara/Math/Sphere.hpp +++ b/include/Nazara/Math/Sphere.hpp @@ -17,7 +17,7 @@ class NzSphere NzSphere() = default; NzSphere(T X, T Y, T Z, T Radius); //NzSphere(const NzCircle& circle); - NzSphere(const NzVector3& pos, T Radius); + NzSphere(const NzVector3& center, T Radius); NzSphere(const T sphere[4]); template explicit NzSphere(const NzSphere& sphere); NzSphere(const NzSphere& sphere) = default; @@ -47,7 +47,7 @@ class NzSphere NzSphere& Set(T X, T Y, T Z, T Radius); //NzSphere& Set(const NzCircle& rect); NzSphere& Set(const NzSphere& sphere); - NzSphere& Set(const NzVector3& pos, T Radius); + NzSphere& Set(const NzVector3& center, T Radius); NzSphere& Set(const T sphere[4]); template NzSphere& Set(const NzSphere& sphere); diff --git a/include/Nazara/Math/Sphere.inl b/include/Nazara/Math/Sphere.inl index 874768f43..662ca7a65 100644 --- a/include/Nazara/Math/Sphere.inl +++ b/include/Nazara/Math/Sphere.inl @@ -23,9 +23,9 @@ NzSphere::NzSphere(const NzCircle& circle) } */ template -NzSphere::NzSphere(const NzVector3& pos, T Radius) +NzSphere::NzSphere(const NzVector3& center, T Radius) { - Set(pos, Radius); + Set(center, Radius); } template @@ -48,7 +48,7 @@ bool NzSphere::Contains(T X, T Y, T Z) const } /* template -bool NzSphere::Contains(const NzCube& point) const +bool NzSphere::Contains(const NzCube& cube) const { } */ @@ -154,11 +154,11 @@ NzSphere& NzSphere::Set(T X, T Y, T Z, T Radius) } template -NzSphere& NzSphere::Set(const NzVector3& pos, T Radius) +NzSphere& NzSphere::Set(const NzVector3& center, T Radius) { - x = pos.x; - y = pos.y; - z = pos.z; + x = center.x; + y = center.y; + z = center.z; radius = Radius; return *this; @@ -210,7 +210,7 @@ template T NzSphere::SquaredDistance(T X, T Y, T Z) const { NzVector3 distance(X-x, Y-y, Z-z); - return radius*radius - distance.SquaredLength(); + return distance.SquaredLength() - radius*radius; } template