From 3a5bfb2bd1c81299c5a3f7f06bfdc12a9b55109d Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 25 Aug 2020 12:58:04 +0200 Subject: [PATCH] matrix: inline to prevent multiple definitions (#147) Without inline we get multiple definitions during linking. --- matrix/helper_functions.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix/helper_functions.hpp b/matrix/helper_functions.hpp index a5c3fbc..9c85fcd 100644 --- a/matrix/helper_functions.hpp +++ b/matrix/helper_functions.hpp @@ -65,7 +65,7 @@ Floating wrap_floating(Floating x, Floating low, Floating high) { * @param high upper limit of the allowed range * @return wrapped value inside the range */ -float wrap(float x, float low, float high) { +inline float wrap(float x, float low, float high) { return matrix::detail::wrap_floating(x, low, high); } @@ -77,7 +77,7 @@ float wrap(float x, float low, float high) { * @param high upper limit of the allowed range * @return wrapped value inside the range */ -double wrap(double x, double low, double high) { +inline double wrap(double x, double low, double high) { return matrix::detail::wrap_floating(x, low, high); }