Jump to content

Angle difference between two bearings: Difference between revisions

m
→‎{{header|Haskell}}: ( applicative inlining of row display function )
m (→‎{{header|Haskell}}: (layout, function name, narrowed import))
m (→‎{{header|Haskell}}: ( applicative inlining of row display function ))
Line 216:
main =
mapM_ putStrLn $
uncurry
displayRow <$>
(((<*>) . printf "%6.2f° + %6.2f° -> %7.2f°") x y $<*> angleBetweenDegrees) x y</lang$>
[ (20.0, 45.0)
, (-45.0, 45.0)
Line 223 ⟶ 224:
, (-45.0, 125.0)
, (-45.0, 145.0)
]</lang>
where
displayRow (x, y) =
printf "%6.2f° + %6.2f° -> %7.2f°" x y $ angleBetweenDegrees x y</lang>
{{Out}}
<pre> 20.00° + 45.00° -> 25.00°
9,659

edits

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