Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
long1=mod((long3+180),360)-180

# Python:
long1 = (lon3long3 + 180) % 360 - 180

# Or:
if long3 <= 180: long1 = long3
else: long1 = long3 - 360

To illustrate the values:

Code Block
long3: 180, 181, ..., 359, 360/0, 1, ..., 179, 180
long1: -180, -179, ... -1, 0, 1, ..., 179, 180

...