coord: make the pow function actually work...

This commit is contained in:
Danny Robson 2018-04-17 17:02:08 +10:00
parent e0f0e3b19b
commit 9affc28807

View File

@ -840,17 +840,15 @@ namespace util {
///////////////////////////////////////////////////////////////////////////
template <
typename K,
typename = std::enable_if_t<
is_coord_v<K>, void
>
typename BaseT,
typename = std::enable_if_t<is_coord_v<BaseT>>
>
constexpr
K
pow (K k)
auto
pow (BaseT k, float p)
{
for (auto &v: k)
v = pow (v);
v = std::pow (v, p);
return k;
}