Angle difference between two bearings: Difference between revisions

→‎{{header|J}}: J uses the mathematical mod, so fancy positivity manipulations are unnecessary.
m (→‎{{header|REXX}}: used more centering for a better display, used a template for the output section.)
(→‎{{header|J}}: J uses the mathematical mod, so fancy positivity manipulations are unnecessary.)
Line 553:
=={{header|J}}==
 
<lang j>relativeBearing=: -&360^:(180&<)@( -~ 360 | 720180 + -~)/"1</lang>
<lang j>tests=: _99&".;._2 noun define
20 45
Line 568:
60175.77306795546 42213.07192354373
)
tests ,. relativeBearing"1 tests
20 45 25
_45 45 90
Anonymous user