GEOM(local)

NAME
geom - geometric arithmetic utilities for SRGP

ROUTINES

point GEOM_sumOfPoints (point pt1, point pt2);
    Adds two points, returning the result.

int GEOM_widthOfRect (rectangle);
int GEOM_heightOfRect (rectangle);
    Computes dimensions of a given rectangle.

void GEOM_computeRectUnion (rectangle r1, rectangle r2, rectangle *result);
    Computes union of two rectangles.

int GEOM_computeRectIntersection
        (rectangle r1, rectangle r2, rectangle *result); Computes intersection of two rectangles; returns TRUE if and only if the intersection is non-null.

rectangle GEOM_rectWithCommonCenter (rectangle, int width, int height);
    Returns the rectangle whose center is the same as the center of the given rectangle, and whose dimensions are as given.

rectangle GEOM_rectFromDiagPoints (point pt1, point pt2);
    Returns the rectangle one of whose diagonals is specified by the two given points. SRGP demands that rectangles be defined only by the SW-NE diagonal. This function is useful when the caller knows a diagonal but knows not which it is.

int GEOM_ptInRect (point pt, rectangle);
    Returns TRUE if and only if the given point is on the boundary of or in the interior of the given rectangle.

AUTHOR
David Sklar