From 1e57c00fa1f9ee423283aee07614b849ef651e82 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 13 Mar 2013 17:09:54 +0100 Subject: [PATCH] Simplified Cube::GetCenter impl Former-commit-id: 59f3fcb694b5758e726c9fd5884307d80d6d3408 --- include/Nazara/Math/Cube.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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