Description
When formatting a small angle with AngleFormat, if the angular value is smaller than 1° in magnitude, then the minus sign is missing. For example formatting -0.1° currently produces 0°06′ while we expect -0°06′.
The problem appear in the following line:
degrees += correction;
The problem is that in the Java language, -0.0 + 0 == +0.0. The fix is to explicitly check for zero value.
if (correction != 0) { // Really need the check for 0 value in order to preserve the sign of negative zero. degrees += correction; }