Simplified Cube::GetCenter impl

Former-commit-id: 59f3fcb694b5758e726c9fd5884307d80d6d3408
This commit is contained in:
Lynix 2013-03-13 17:09:54 +01:00
parent 90f056739d
commit 1e57c00fa1
1 changed files with 1 additions and 1 deletions

View File

@ -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>