mirror of https://github.com/apache/lucene.git
LUCENE-7849: GeoWideLongitudeSlice can fail to construct
This commit is contained in:
parent
851ab0ad34
commit
fed7343d2e
|
@ -75,7 +75,13 @@ class GeoWideLongitudeSlice extends GeoBaseBBox {
|
|||
while (leftLon > rightLon) {
|
||||
rightLon += Math.PI * 2.0;
|
||||
}
|
||||
final double middleLon = (leftLon + rightLon) * 0.5;
|
||||
double middleLon = (leftLon + rightLon) * 0.5;
|
||||
while (middleLon > Math.PI) {
|
||||
middleLon -= Math.PI * 2.0;
|
||||
}
|
||||
while (middleLon < -Math.PI) {
|
||||
middleLon += Math.PI * 2.0;
|
||||
}
|
||||
this.centerPoint = new GeoPoint(planetModel, 0.0, middleLon);
|
||||
|
||||
this.leftPlane = new SidedPlane(centerPoint, cosLeftLon, sinLeftLon);
|
||||
|
|
Loading…
Reference in New Issue