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:22:06 UTC
lucene-solr:master: LUCENE-8089: Add PlanetModel method that returns
true if planetmodel is a sphere.
Repository: lucene-solr
Updated Branches:
refs/heads/master ca84ca2f7 -> 952f4c4e5
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/952f4c4e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/952f4c4e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/952f4c4e
Branch: refs/heads/master
Commit: 952f4c4e59fff389a143aaccf6ac724103667915
Parents: ca84ca2
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:21:52 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/952f4c4e/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.
*/