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
inline value_type getVolume() const {
value_type result = 0;
for (int i=0; i<point_type::dim; ++i) {
value_type tmp = max[i] - min[i];
result += tmp*tmp;
}
vector_type diff = max-min;
value_type result = diff[1];
for (int i=1; i<point_type::dim; ++i)
result *= diff[i];
return result;
}