intersection
fun intersection(rectangle: Rectangle, otherRectangle: Rectangle, result: Rectangle? = definedExternally): Rectangle?(source)
Computes the intersection of two rectangles. This function assumes that the rectangle's coordinates are latitude and longitude in radians and produces a correct intersection, taking into account the fact that the same angle can be represented with multiple values as well as the wrapping of longitude at the anti-meridian. For a simple intersection that ignores these factors and can be used with projected coordinates, see Rectangle.simpleIntersection.
Return
The modified result parameter, a new Rectangle instance if none was provided or undefined if there is no intersection.
Parameters
rectangle
On rectangle to find an intersection
otherRectangle
Another rectangle to find an intersection
result
The object onto which to store the result.