diff options
Diffstat (limited to 'utils/star.h')
-rw-r--r-- | utils/star.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/star.h b/utils/star.h index e7358ffa..21977dc9 100644 --- a/utils/star.h +++ b/utils/star.h @@ -4,14 +4,14 @@ // star(x) computes the infinite sum x^0 + x^1 + x^2 + ... template <typename T> -T star(const T& x) { +inline T star(const T& x) { if (!x) return T(); if (x > T(1)) return std::numeric_limits<T>::infinity(); if (x < -T(1)) return -std::numeric_limits<T>::infinity(); return T(1) / (T(1) - x); } -bool star(bool x) { +inline bool star(bool x) { return x; } |