maths: add pow2 convenience function
This commit is contained in:
parent
a50624340e
commit
b9f739324a
@ -192,6 +192,13 @@ namespace cruft {
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename ValueT>
|
||||
constexpr auto
|
||||
pow2 [[gnu::const]] (ValueT const &val)
|
||||
{ return val * val; }
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
constexpr
|
||||
|
Loading…
Reference in New Issue
Block a user