ekmett / ekmett/linear

add function (V2 to its angle(inverse of `angle`))

Open
#136 5 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Haskell
Stars
220
Forks
55
PR merge metrics
No merged PRs in 30d

Description

I use this function a lot.
```
unAngle :: V2 Double -> Double
unAngle (V2 ax ay) =
let alpha = asin $ ay / (ax * ax + ay * ay)
in if ax < 0
then pi - alpha
else alpha
```
Shoud we add it to Linear.V2?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.