diff options
author | attila-csipa <attila.csipa@hp.com> | 2017-07-07 13:16:16 +0100 |
---|---|---|
committer | attila-csipa <attila.csipa@hp.com> | 2017-07-07 13:16:16 +0100 |
commit | 5ded46a80ec82137869ebd234189b1fd9ffff680 (patch) | |
tree | feac22663567716e51133734d7592da64adfd239 /compat/math-imports.hpp | |
parent | 816c857c513e42a0b2583c2ab7bd89610f968f93 (diff) | |
parent | f013741288cbbd9a2e70aea727cbb80cf72d10cc (diff) |
Merge remote-tracking branch 'upstream/unstable' into unstable
Diffstat (limited to 'compat/math-imports.hpp')
-rw-r--r-- | compat/math-imports.hpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/compat/math-imports.hpp b/compat/math-imports.hpp new file mode 100644 index 00000000..ad70f361 --- /dev/null +++ b/compat/math-imports.hpp @@ -0,0 +1,45 @@ +#pragma once + +#include <cmath> +#include <cinttypes> + +namespace otr_math +{ + +using std::copysign; + +using std::sqrt; +using std::pow; + +using std::fabs; +using std::fmin; +using std::fmax; + +using std::atan; +using std::atan2; +using std::asin; +using std::acos; + +using std::sin; +using std::cos; +using std::tan; + +using std::round; +using std::fmod; + +using std::uintptr_t; +using std::intptr_t; + +using std::int64_t; +using std::int32_t; + +using std::uint64_t; +using std::uint32_t; + +template <typename T> +static inline constexpr auto signum(T x) +{ + return (T() < x) - (x < T()); +} + +} // ns otr_math |