strange, I thought I had fixed this

metadata
Wenzel Jakob 2011-10-12 02:32:33 -04:00
parent 2e46c7a8d0
commit 2bd533f647
1 changed files with 4 additions and 5 deletions

View File

@ -100,11 +100,10 @@ template <typename T> struct TAABB {
/// Calculate the n-dimensional volume of the bounding box /// Calculate the n-dimensional volume of the bounding box
inline value_type getVolume() const { inline value_type getVolume() const {
value_type result = 0; vector_type diff = max-min;
for (int i=0; i<point_type::dim; ++i) { value_type result = diff[1];
value_type tmp = max[i] - min[i]; for (int i=1; i<point_type::dim; ++i)
result += tmp*tmp; result *= diff[i];
}
return result; return result;
} }