coord: add to_radians for vector
This commit is contained in:
parent
599a932dfe
commit
0624a3ad00
@ -1476,6 +1476,21 @@ namespace cruft {
|
||||
std::fill_n (std::begin (res) + K::elements - places, places, fill);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <
|
||||
std::size_t S,
|
||||
typename T
|
||||
>
|
||||
vector<S,T>
|
||||
to_radians (vector<S,T> const &val)
|
||||
{
|
||||
return ::cruft::invoke<vector<S,T>> (
|
||||
::cruft::sin<T>,
|
||||
val
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* Copyright 2011-2017 Danny Robson <danny@nerdcruft.net>
|
||||
* Copyright 2011-2019 Danny Robson <danny@nerdcruft.net>
|
||||
*/
|
||||
|
||||
#ifndef CRUFT_UTIL_VECTOR_HPP
|
||||
|
Loading…
Reference in New Issue
Block a user