You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2019/10/04 15:07:58 UTC
[sis] 02/02: Adjust formatting of angular value of zero. Fix typo
in person name.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
commit 574a501bd275a26c0ba48d69e7e263e5220189ad
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Fri Oct 4 16:53:30 2019 +0200
Adjust formatting of angular value of zero.
Fix typo in person name.
---
.../java/org/apache/sis/referencing/operation/projection/Polyconic.java | 2 +-
core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Polyconic.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Polyconic.java
index 2d597f1..d9ef536 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Polyconic.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Polyconic.java
@@ -226,7 +226,7 @@ public class Polyconic extends MeridianArcBased {
final double x = srcPts[srcOff ];
final double y = srcPts[srcOff+1];
double φ = y; // A = (M₀ + (N-FE)/a) — Snyder 18-18 with M₀=0, FE=0 and a=1.
- final double B = y*y + x*x; // B = A² + ((E-FE)²/a²) — Synder 18-19 with FE=0 and a=1.
+ final double B = y*y + x*x; // B = A² + ((E-FE)²/a²) — Snyder 18-19 with FE=0 and a=1.
int i = MAXIMUM_ITERATIONS;
double dφ;
do {
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java b/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java
index ee7d04a..a1ded31 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java
@@ -267,7 +267,7 @@ public class Angle implements Comparable<Angle>, Formattable, Serializable {
StringBuffer buffer = new StringBuffer();
double m = Math.abs(θ);
final boolean isSmall = m <= (1 / 3600E+3); // 1E-3 arc-second.
- if (isSmall || m > maximum()) {
+ if ((isSmall || m > maximum()) && m != 0) {
final char h = hemisphere(isNegative(θ));
if (h == 0) {
m = θ; // Restore the sign.