diff options
Diffstat (limited to 'zen/basic_math.h')
-rw-r--r-- | zen/basic_math.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/zen/basic_math.h b/zen/basic_math.h index 9a3d195e..227d1cd4 100644 --- a/zen/basic_math.h +++ b/zen/basic_math.h @@ -88,22 +88,13 @@ const double ln2 = 0.693147180559945309417; - - - - - - - - - //################# inline implementation ######################### template <class T> inline T abs(T value) { static_assert(std::is_signed<T>::value, ""); if (value < 0) - return -value; // operator "?:" caveat: may be different type than "value" + return -value; //operator "?:" caveat: may be different type than "value" else return value; } |