Add angle(vector<T,2>)
This commit is contained in:
parent
e1f8958123
commit
bea016fac0
1 changed files with 6 additions and 0 deletions
|
|
@ -308,6 +308,12 @@ namespace psemek::geom
|
|||
return {std::cos(angle), std::sin(angle)};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T angle(vector<T, 2> const & v)
|
||||
{
|
||||
return std::atan2(v[1], v[0]);
|
||||
}
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
vector<T, N> pointwise_mult(vector<T, N> const & v0, vector<T, N> const & v1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue