Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
matrix: inline to prevent multiple definitions (#147)
Browse files Browse the repository at this point in the history
Without inline we get multiple definitions during linking.
  • Loading branch information
julianoes committed Aug 25, 2020
1 parent e101edc commit 3a5bfb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions matrix/helper_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 3a5bfb2

Please sign in to comment.