sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 01/06: Minor documentation.
Date Wed, 15 Jul 2020 18:05:59 GMT
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 74b89ccc4f7c8f74f3787681826d41a8f90d3ebe
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Wed Jul 15 10:39:31 2020 +0200

    Minor documentation.
---
 .../main/java/org/apache/sis/geometry/GeneralDirectPosition.java   | 2 ++
 .../sis/referencing/operation/projection/NormalizedProjection.java | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
b/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
index 0182891..d7acc44 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
@@ -87,6 +87,7 @@ public class GeneralDirectPosition extends AbstractDirectPosition implements
Ser
     /**
      * Constructs a position using the specified coordinate reference system.
      * The number of dimensions is inferred from the coordinate reference system.
+     * All coordinate values are initialized to zero.
      *
      * @param  crs  the coordinate reference system to be given to this position.
      */
@@ -97,6 +98,7 @@ public class GeneralDirectPosition extends AbstractDirectPosition implements
Ser
 
     /**
      * Constructs a position with the specified number of dimensions.
+     * All coordinate values are initialized to zero.
      *
      * @param  dimension  number of dimensions.
      * @throws NegativeArraySizeException if {@code dimension} is negative.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
index 3e1560c..72929a4 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
@@ -731,6 +731,13 @@ public abstract class NormalizedProjection extends AbstractMathTransform2D
imple
         // Check also if we should do the same with plain x*x + y*y in subclasses.
     }
 
+    /*
+     * TODO: consider adding a sqrt1ms(x) method for sqrt(1 - x*x), which could be implemented
as sqrt(fma(x, -x, 1)).
+     * The use of Math.fma(…) in this context would be valuable especially when x is close
to 1 (to be verified).
+     * We may also add a method for sqrt(1 - eccentricitySquared*x*x). Maybe `eccentricitySquared`
should be made
+     * package private and negative for easier use with fma.
+     */
+
     /**
      * Converts a single coordinate in {@code srcPts} at the given offset and stores the
result
      * in {@code dstPts} at the given offset. In addition, opportunistically computes the


Mime
View raw message