diff options
-rw-r--r-- | src/mbgl/util/math.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/util/math.hpp b/src/mbgl/util/math.hpp index fcde01c1a3..c18ce0c254 100644 --- a/src/mbgl/util/math.hpp +++ b/src/mbgl/util/math.hpp @@ -77,9 +77,9 @@ T mag(const S& a) { return std::sqrt(a.x * a.x + a.y * a.y); } -template <typename S> +template <typename T = double, typename S> S unit(const S& a) { - auto magnitude = mag(a); + auto magnitude = mag<T>(a); if (magnitude == 0) { return a; } |