diff options
Diffstat (limited to 'src/math.hpp')
-rw-r--r-- | src/math.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/math.hpp b/src/math.hpp index 8c93a76..2957d00 100644 --- a/src/math.hpp +++ b/src/math.hpp @@ -275,6 +275,17 @@ public: return v[1][i] - v[0][i]; } + T dim_min(void) const + { + T min = INFINITY; + + for (size_t i = 0; i < N; i++) + if (dim(i) < min) + min = dim(i); + + return min; + } + rect_t<T, N> norm(void) const { rect_t<T, N> r; |