You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2017/12/11 09:23:02 UTC
lucene-solr:branch_6x: LUCENE-8089: Add PlanetModel method that
returns true if planetmodel is a sphere.
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x f48f998ea -> 635bd2a49
LUCENE-8089: Add PlanetModel method that returns true if planetmodel is a sphere.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/635bd2a4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/635bd2a4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/635bd2a4
Branch: refs/heads/branch_6x
Commit: 635bd2a4963730a9e75f67f47bd4271073837589
Parents: f48f998
Author: Karl Wright <Da...@gmail.com>
Authored: Mon Dec 11 04:21:52 2017 -0500
Committer: Karl Wright <Da...@gmail.com>
Committed: Mon Dec 11 04:22:55 2017 -0500
----------------------------------------------------------------------
.../java/org/apache/lucene/spatial3d/geom/PlanetModel.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/635bd2a4/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/PlanetModel.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/PlanetModel.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/PlanetModel.java
index 2aabfc1..55b730d 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/PlanetModel.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/PlanetModel.java
@@ -122,6 +122,13 @@ public class PlanetModel implements SerializableObject {
SerializableObject.writeDouble(outputStream, c);
}
+ /** Does this planet model describe a sphere?
+ *@return true if so.
+ */
+ public boolean isSphere() {
+ return this.ab == this.c;
+ }
+
/** Find the minimum magnitude of all points on the ellipsoid.
* @return the minimum magnitude for the planet.
*/