Description
Return the smaller of their absolute difference and its 360-degree complement as shortArcDegrees, and 360 minus that result as longArcDegrees.
Longitude is an angular coordinate with a seam and equivalent values separated by full turns. Interval direction, endpoint inclusion, and half-turn policy must be fixed before comparing or averaging longitudes.
Return the smaller of their absolute difference and its 360-degree complement as shortArcDegrees, and 360 minus that result as longArcDegrees.
When to use this tool
Use Longitude Arc Complement when you need a longitude normalization, interval, or seam-policy calculation.
How to use the tool and how it works
- Enter firstDegrees, secondDegrees. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read shortArcDegrees, longArcDegrees. Use the output convention below.
Require two longitudes within [-180, 180]. Return the smaller of their absolute difference and its 360-degree complement as shortArcDegrees, and 360 minus that result as longArcDegrees.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstDegrees | First Degrees | Required. Finite number; minimum -180; maximum 180. |
| secondDegrees | Second Degrees | Required. Finite number; minimum -180; maximum 180. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| shortArcDegrees | Short Arc Degrees | Required. Finite number. |
| longArcDegrees | Long Arc Degrees | Required. Finite number. |
{
"input": {
"firstDegrees": 170,
"secondDegrees": -170
},
"output": {
"shortArcDegrees": 20,
"longArcDegrees": 340
}
} Limitations and assumptions
- Coincident directions produce short arc zero and long arc 360. These are longitude-circle angular spans, not generally great-circle distances between points at arbitrary latitudes.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a full spherical or ellipsoidal geometry method for routes and areas. Retain an explicit seam and endpoint policy when splitting, sorting, or averaging geographic data.
References
Similar or alternative tools
- Longitude Cell Half Open Membership
Test membership in the west-inclusive, east-exclusive interval, using a union across the seam when west exceeds east.
- Longitude Halfturn Tie Direction Label
Wrap to minus from modulo 360.