Changed parameter name (nothing relevant)
Former-commit-id: 3b0355d998300b57ab83562f9b107925e4be6c29
This commit is contained in:
@@ -23,9 +23,9 @@ NzSphere<T>::NzSphere(const NzCircle<T>& circle)
|
||||
}
|
||||
*/
|
||||
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>
|
||||
@@ -48,7 +48,7 @@ bool NzSphere<T>::Contains(T X, T Y, T Z) const
|
||||
}
|
||||
/*
|
||||
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>
|
||||
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;
|
||||
y = pos.y;
|
||||
z = pos.z;
|
||||
x = center.x;
|
||||
y = center.y;
|
||||
z = center.z;
|
||||
radius = Radius;
|
||||
|
||||
return *this;
|
||||
@@ -210,7 +210,7 @@ template<typename T>
|
||||
T NzSphere<T>::SquaredDistance(T X, T Y, T Z) const
|
||||
{
|
||||
NzVector3<T> distance(X-x, Y-y, Z-z);
|
||||
return radius*radius - distance.SquaredLength();
|
||||
return distance.SquaredLength() - radius*radius;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user