Fix geom::angle(vector, vector)
This commit is contained in:
parent
60150151df
commit
0c3f4c3134
1 changed files with 1 additions and 1 deletions
|
|
@ -317,7 +317,7 @@ namespace psemek::geom
|
|||
template <typename T, std::size_t N>
|
||||
T angle(vector<T, N> const & v0, vector<T, N> const & v1)
|
||||
{
|
||||
return std::acos(std::max(T{-1}, std::min(T{1}, dot(v0, v1))));
|
||||
return std::atan2(det(v0, v1), dot(v0, v1));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue