diff --git a/coord/ops.hpp b/coord/ops.hpp index 32d25d59..1286ccfd 100644 --- a/coord/ops.hpp +++ b/coord/ops.hpp @@ -1391,7 +1391,27 @@ namespace std { return v; } }; -} + + template < + typename CoordT, + typename = std::enable_if_t< + ::util::is_coord_v, void + > + > + auto cos (CoordT val) + { + CoordT out; + + std::transform ( + std::begin (val), + std::end (val), + std::begin (out), + [] (auto i) { return ::std::cos (i); } + ); + + return out; + } +}; #endif