Simplified Cube::GetCenter impl
Former-commit-id: 59f3fcb694b5758e726c9fd5884307d80d6d3408
This commit is contained in:
@@ -147,7 +147,7 @@ NzSphere<T> NzCube<T>::GetBoundingSphere() const
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
NzVector3<T> NzCube<T>::GetCenter() const
|
NzVector3<T> NzCube<T>::GetCenter() const
|
||||||
{
|
{
|
||||||
return NzVector3<T>(x + width*F(0.5), y + height*F(0.5), z + depth*F(0.5));
|
return GetPosition() + F(0.5)*GetSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|||||||
Reference in New Issue
Block a user