oh my god -- how many attempts will it take me to compute volumes correctly :)

metadata
Wenzel Jakob 2011-10-19 11:38:45 -04:00
parent 2bd533f647
commit 3d33885858
1 changed files with 1 additions and 1 deletions

View File

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