From 5186351345d43801ac45acde8b7e30734eea0349 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 7 Nov 2017 18:33:03 +0100 Subject: Better unit say. --- src/math.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/math.hpp') 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 norm(void) const { rect_t r; -- cgit