
Fold a longitude back into range after a heading change carries it past the date line.
February 11, 2007. Twelve F-22 Raptors leave Hawaii for Okinawa, and the moment they cross the international date line every onboard computer drops out. Navigation gone, most of the radios with it. Nobody was hurt. The pilots stayed glued to their tankers and followed them back by eye, and Lockheed had a patch out inside 48 hours. Teach the nav computer what happens at 180 degrees.
fold_longitude(179, 1)Expected result
-180For your own tracking. Tests grade your code.
fold_longitude(-180, -1)Expected result
179fold_longitude(0, 0)Expected result
0Expected files
nav.cAllowed functions
None. Write every helper yourself.
