diff options
Diffstat (limited to 'src/math.hpp')
-rw-r--r-- | src/math.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/math.hpp b/src/math.hpp index 9b909cf..7cbd829 100644 --- a/src/math.hpp +++ b/src/math.hpp @@ -352,6 +352,16 @@ public: return min; } + T area(void) const + { + T area = 1; + + for (size_t i = 0; i < N; i++) + area *= dim(i); + + return area; + } + rect_t<T, N> norm(void) const { rect_t<T, N> r; |