Simplified Cube::GetCenter impl
Former-commit-id: 59f3fcb694b5758e726c9fd5884307d80d6d3408
This commit is contained in:
parent
90f056739d
commit
1e57c00fa1
|
|
@ -147,7 +147,7 @@ NzSphere<T> NzCube<T>::GetBoundingSphere() const
|
|||
template<typename T>
|
||||
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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue