Jump to content

Angle difference between two bearings: Difference between revisions

m (→‎{{header|Wren}}: Changed to Wren S/H)
(→‎BQN: add)
Line 1,733:
25 90 175 -175 170 -170 -117 -81 -141 -74 -160 38
</pre>
 
=={{header|BQN}}==
<syntaxhighlight lang="bqn">Adiff ← 180 + ¯360 | 180 + -˜
 
tests ← [20‿45, ¯45 ‿45, ¯85 ‿90, ¯95 ‿90, ¯45 ‿125, ¯45 ‿145
29.4803‿¯88.6381, ¯78.3251‿¯159.036
¯70099.74233810938‿29840.67437876723
¯165313.6666297357‿33693.9894517456
1174.8380510598456‿¯154146.66490124757
60175.77306795546‿42213.07192354373]
 
Round ← ⌊∘+⟜0.5⌾(1e3⊸×)
 
Round∘∾⟜(Adiff´)˘ tests</syntaxhighlight>
{{out}}
<pre>┌─
╵ 20 45 25
¯45 45 90
¯85 90 175
¯95 90 ¯175
¯45 125 170
¯45 145 ¯170
29.48 ¯88.638 ¯118.118
¯78.325 ¯159.036 ¯80.711
¯70099.742 29840.674 ¯139.583
¯165313.667 33693.989 ¯72.344
1174.838 ¯154146.665 ¯161.503
60175.773 42213.072 37.299
┘</pre>
 
=={{header|C}}==
559

edits

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