diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-11-07 18:33:03 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-11-07 18:33:03 +0100 |
commit | 5186351345d43801ac45acde8b7e30734eea0349 (patch) | |
tree | 7c331bb3c34de2ce31a791f79e7bf783534870d0 /src/math.hpp | |
parent | d0be87d32929c42502fb842aa2b0ab0233313b93 (diff) |
Better unit say.
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; |