PostGIS
3.2.2dev-r@@SVN_REVISION@@
|
|
static |
Calculates the intersection points of a circle and a horizontal line.
The equation of a circle is (x - cx)^2 + (y - cy)^2 = r^2. The equation of the horizontal line is y = y_line. Substituting y_line into the circle equation gives: (x - cx)^2 = r^2 - (y_line - cy)^2 This function solves for x.
center | A pointer to the center point of the circle. |
radius | The radius of the circle. |
ray | The y-coordinate of the horizontal line. |
i0 | A pointer to a POINT2D to store the first intersection point. |
i1 | A pointer to a POINT2D to store the second intersection point. |
Definition at line 894 of file ptarray.c.
References FP_EQUALS, POINT2D::x, and POINT2D::y.
Referenced by ptarrayarc_raycast_intersections().