nknize commented on code in PR #809: URL: https://github.com/apache/lucene/pull/809#discussion_r848570743
########## lucene/core/src/java/org/apache/lucene/geo/Polygon2D.java: ########## @@ -257,10 +257,13 @@ public WithinRelation withinLine( boolean ab, double bX, double bY) { - if (ab == true Review Comment: I don't remember if order matters here? Seems before we would bail early if `ab == false` and skip the costly checks. Does that logic still stand if we move an `ab == false` check up front? ########## lucene/core/src/java/org/apache/lucene/document/LatLonShapeBoundingBoxQuery.java: ########## @@ -485,8 +485,11 @@ boolean containsTriangle(int aX, int aY, int bX, int bY, int cX, int cY) { } /** Returns the Within relation to the provided triangle */ - Component2D.WithinRelation withinLine(int ax, int ay, boolean ab, int bx, int by) { - if (ab == true && edgeIntersectsBox(ax, ay, bx, by, minX, maxX, minY, maxY) == true) { + Component2D.WithinRelation withinLine(int aX, int aY, boolean ab, int bX, int bY) { Review Comment: :+1: I think this is cleaner -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org