maths: style

This commit is contained in:
Danny Robson 2015-09-16 02:24:49 +10:00
parent 0967c5252f
commit 381da163e2

View File

@ -37,19 +37,22 @@ namespace util {
}
//-----------------------------------------------------------------------------
// Exponentials
///////////////////////////////////////////////////////////////////////////////
// exponentials
template <typename T>
constexpr T
pow2 [[gnu::pure]] (T value)
{ return value * value; }
//-----------------------------------------------------------------------------
template <typename T>
constexpr T
pow [[gnu::pure]] (T x, unsigned y);
//-----------------------------------------------------------------------------
template <typename T>
bool
is_pow2 [[gnu::pure]] (T value);