strange, I thought I had fixed this
parent
2e46c7a8d0
commit
2bd533f647
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue