Jump to content

Angle difference between two bearings: Difference between revisions

m
→‎{{header|Haskell}}: Replaced (if then else) with guards
m (→‎{{header|Haskell}}: Replaced (if then else) with guards)
Line 713:
(ax, ay) = (sin a, cos a)
(bx, by) = (sin b, cos b)
sign -- cross-product > 0 ?
| ((ay * bx) - (by * ax)) > 0 = 1
=
if| ((ayotherwise * bx)= - (by * ax)) > 01
then 1
else (-1)
 
degrees :: Radians -> Degrees
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.