Anonymous user
Angle difference between two bearings: Difference between revisions
Angle difference between two bearings (view source)
Revision as of 17:56, 11 March 2018
, 6 years ago→{{header|APL}}
(→{{header|J}}: J uses the mathematical mod, so fancy positivity manipulations are unnecessary.) |
|||
Line 87:
</pre>
=={{header|APL}}==
Returns an angle in (-180,180]; so two opposite bearings
<lang APL>[0] D←B1 DIFF B2
[1] D←180+¯360|180+B2-B1
|