Changed parameter name (nothing relevant)

Former-commit-id: 3b0355d998300b57ab83562f9b107925e4be6c29
This commit is contained in:
Lynix 2013-03-12 23:35:37 +01:00
parent 5cc0ce4758
commit d695bb02e8
2 changed files with 10 additions and 10 deletions

View File

@ -17,7 +17,7 @@ class NzSphere
NzSphere() = default; NzSphere() = default;
NzSphere(T X, T Y, T Z, T Radius); NzSphere(T X, T Y, T Z, T Radius);
//NzSphere(const NzCircle<T>& circle); //NzSphere(const NzCircle<T>& circle);
NzSphere(const NzVector3<T>& pos, T Radius); NzSphere(const NzVector3<T>& center, T Radius);
NzSphere(const T sphere[4]); NzSphere(const T sphere[4]);
template<typename U> explicit NzSphere(const NzSphere<U>& sphere); template<typename U> explicit NzSphere(const NzSphere<U>& sphere);
NzSphere(const NzSphere& sphere) = default; NzSphere(const NzSphere& sphere) = default;
@ -47,7 +47,7 @@ class NzSphere
NzSphere& Set(T X, T Y, T Z, T Radius); NzSphere& Set(T X, T Y, T Z, T Radius);
//NzSphere& Set(const NzCircle<T>& rect); //NzSphere& Set(const NzCircle<T>& rect);
NzSphere& Set(const NzSphere& sphere); NzSphere& Set(const NzSphere& sphere);
NzSphere& Set(const NzVector3<T>& pos, T Radius); NzSphere& Set(const NzVector3<T>& center, T Radius);
NzSphere& Set(const T sphere[4]); NzSphere& Set(const T sphere[4]);
template<typename U> NzSphere& Set(const NzSphere<U>& sphere); template<typename U> NzSphere& Set(const NzSphere<U>& sphere);

View File

@ -23,9 +23,9 @@ NzSphere<T>::NzSphere(const NzCircle<T>& circle)
} }
*/ */
template<typename T> template<typename T>
NzSphere<T>::NzSphere(const NzVector3<T>& pos, T Radius) NzSphere<T>::NzSphere(const NzVector3<T>& center, T Radius)
{ {
Set(pos, Radius); Set(center, Radius);
} }
template<typename T> template<typename T>
@ -48,7 +48,7 @@ bool NzSphere<T>::Contains(T X, T Y, T Z) const
} }
/* /*
template<typename T> template<typename T>
bool NzSphere<T>::Contains(const NzCube<T>& point) const bool NzSphere<T>::Contains(const NzCube<T>& cube) const
{ {
} }
*/ */
@ -154,11 +154,11 @@ NzSphere<T>& NzSphere<T>::Set(T X, T Y, T Z, T Radius)
} }
template<typename T> template<typename T>
NzSphere<T>& NzSphere<T>::Set(const NzVector3<T>& pos, T Radius) NzSphere<T>& NzSphere<T>::Set(const NzVector3<T>& center, T Radius)
{ {
x = pos.x; x = center.x;
y = pos.y; y = center.y;
z = pos.z; z = center.z;
radius = Radius; radius = Radius;
return *this; return *this;
@ -210,7 +210,7 @@ template<typename T>
T NzSphere<T>::SquaredDistance(T X, T Y, T Z) const T NzSphere<T>::SquaredDistance(T X, T Y, T Z) const
{ {
NzVector3<T> distance(X-x, Y-y, Z-z); NzVector3<T> distance(X-x, Y-y, Z-z);
return radius*radius - distance.SquaredLength(); return distance.SquaredLength() - radius*radius;
} }
template<typename T> template<typename T>