ソースを参照

Fix radius calculation returning diameter

The getRadius function used to return the diameter of the bounding sphere.
Marco Bellan 8 年 前
コミット
0686e22bf3
1 ファイル変更1 行追加1 行削除
  1. 1 1
      Source/BansheeUtility/Source/BsAABox.cpp

+ 1 - 1
Source/BansheeUtility/Source/BsAABox.cpp

@@ -458,7 +458,7 @@ namespace bs
 
 	float AABox::getRadius() const
 	{
-		return (mMaximum - mMinimum).length();
+		return ((mMaximum + mMinimum) * 0.5).length();
 	}
 
 	float AABox::getVolume() const