Returns the vector result of p1 - p2.
Return the closest point in this rectangle to the given point "p".
If the dot product of p with the given face normal is positive, set the corresponding u and v
values (which may lie outside the range [-1,1]) and return true.
Returns the center of this rectangle in (x,y)-space.
Returns the center of the cell in (s,t) coordinates.
Return the center of the cell in (u,v) coordinates (see S2Projections).
Returns the center of the cell in (u,v) coordinates.
Return the width and height of this rectangle in (x,y)-space.
Returns the kth vertex of this rectangle (k = 0,1,2,3) in CCW order.
Returns the vertex in direction "i" along the x-axis (0=left, 1=right) and direction "j" along
the y-axis (0=down, 1=up).
Returns the point in this rectangle with the maximum x and y values.
Returns the point in this rectangle with the minimum x and y values.
Returns the element-wise multiplication of p1 and p2, e.g.
Returns a new vector scaled to magnitude 1, or a copy of the original vector if magnitude was
0.
Returns a new R2 vector orthogonal to the current one with the same norm and counterclockwise
to it.
Returns the vector result of p1 - p2.
Given a *valid* face for the given point p (meaning that dot product of p with the face normal
is positive), return the corresponding u and v values (which may lie outside the range [-1,1]).
Returns the vector result of p1 - p2.
void
Increase the size of the bounding rectangle to include the given point.
Return the closest point in this rectangle to the given point "p".
static boolean
Given an edge AB and a face, return the (u,v) coordinates for the portion of AB that intersects
that face.
static boolean
As
S2EdgeUtil.clipToFace(S2Point, S2Point, int, R2Vector, R2Vector), but rather than clipping to
the square [-1,1]x[-1,1] in (u,v) space, this method clips to [-R,R]x[-R,R] where
R=(1+padding).
boolean
Returns true if this rectangle contains the given point.
double
Returns the cross product of this vector with that vector.
double
Returns the dot product of this vector with that vector.
static double
Returns the dot product of the given vectors.
Return a rectangle that has been expanded on each side in the x-direction by margin.x(), and on
each side in the y-direction by margin.y().
Convert (face, u, v) coordinates to a direction vector (not necessarily unit length).
Returns a new rectangle from a center point and size in each dimension.
Returns a rectangle containing a single point.
Returns the minimal bounding rectangle containing the two given points.
boolean
Returns true if and only if the given point is contained in the interior of the region (i.e.
the region excluding its boundary).
boolean
Returns true if this vector is less than that vector, with the x-axis as the primary sort key
and the y-axis as the secondary sort key.
Returns the element-wise multiplication of p1 and p2, e.g.
Returns a new vector scaled to magnitude 1, or a copy of the original vector if magnitude was
0.
static int
Returns +1 if the edge AB is CCW around the origin, -1 if its clockwise, and 0 if the result is
indeterminate.
static int
Returns the vector result of p1 - p2.