From 62c3e5f2b620bdb6cef6da957fc912a12964237d Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 23 Dec 2022 13:44:40 +0100 Subject: [PATCH] fix: `hypot` implementation fixed --- src/core/include/units/math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/include/units/math.h b/src/core/include/units/math.h index 56818c10..8573766f 100644 --- a/src/core/include/units/math.h +++ b/src/core/include/units/math.h @@ -273,7 +273,7 @@ template { using std::hypot; using type = quantity; - return type{hypot(x.number(), y.number())}; + return type{hypot(type{x}.number(), type{y}.number())}; } /** @@ -291,7 +291,7 @@ template using std::hypot; using type = quantity; - return type{hypot(x.number(), y.number(), z.number())}; + return type{hypot(type{x}.number(), type{y}.number(), type{z}.number())}; } } // namespace units