diff --git a/include/Nazara/Math/Cube.inl b/include/Nazara/Math/Cube.inl index 12e381ed9..2e251c43b 100644 --- a/include/Nazara/Math/Cube.inl +++ b/include/Nazara/Math/Cube.inl @@ -147,7 +147,7 @@ NzSphere NzCube::GetBoundingSphere() const template NzVector3 NzCube::GetCenter() const { - return NzVector3(x + width*F(0.5), y + height*F(0.5), z + depth*F(0.5)); + return GetPosition() + F(0.5)*GetSize(); } template