79741134

Date: 2025-08-20 13:42:46
Score: 0.5
Natty:
Report link

Relative distance from -180 to +180 (a and b can be millions of degrees apart, i.e. have winding):

(b - a) % 360

Absolute distance from 0 to +180 (a and b can be millions of degrees apart, i.e. have winding):

Math.abs((b - a) % 360)

Don't overcomplicate what doesn't need to be complicated.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: huh-hulk