diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-01 13:46:47 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-01 13:46:47 +0200 |
commit | be628dc7f9c32ca84674c8717f07cc15a40f333c (patch) | |
tree | 09c54df1ce9e5905a1a3d90434b8c9fea021eb1b /src/math.hpp | |
parent | 6c46e70e3576ae9d27c3ad5c8c95c3198c9be501 (diff) |
Improve selecting.
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; |