maths: add pow2 convenience function

This commit is contained in:
Danny Robson 2019-03-28 14:27:02 +11:00
parent a50624340e
commit b9f739324a

View File

@ -192,6 +192,13 @@ namespace cruft {
}
//-------------------------------------------------------------------------
template <typename ValueT>
constexpr auto
pow2 [[gnu::const]] (ValueT const &val)
{ return val * val; }
//-------------------------------------------------------------------------
template <typename T>
constexpr