VEC: improve readability
This commit is contained in:
parent
1545861e5b
commit
2b15585b41
@ -49,10 +49,10 @@ inRange ((xmin, ymin), (xmax, ymax)) (coords -> x :& y)
|
|||||||
-- |Get the angle between two vectors.
|
-- |Get the angle between two vectors.
|
||||||
getAngle :: Vec -> Vec -> Double
|
getAngle :: Vec -> Vec -> Double
|
||||||
getAngle a b =
|
getAngle a b =
|
||||||
acos .
|
acos
|
||||||
flip (/) (vecLength a * vecLength b) .
|
. flip (/) (vecLength a * vecLength b)
|
||||||
scalarProd a $
|
. scalarProd a
|
||||||
b
|
$ b
|
||||||
|
|
||||||
|
|
||||||
-- |Get the length of a vector.
|
-- |Get the length of a vector.
|
||||||
|
Loading…
Reference in New Issue
Block a user