GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
Loading...
Searching...
No Matches
intersect.c File Reference

Go to the source code of this file.

Macros

#define D   ((ax2 - ax1) * (by1 - by2) - (ay2 - ay1) * (bx1 - bx2))
 
#define D1   ((bx1 - ax1) * (by1 - by2) - (by1 - ay1) * (bx1 - bx2))
 
#define D2   ((ax2 - ax1) * (by1 - ay1) - (ay2 - ay1) * (bx1 - ax1))
 
#define SWAP(x, y)
 

Functions

int G_intersect_line_segments (double ax1, double ay1, double ax2, double ay2, double bx1, double by1, double bx2, double by2, double *ra, double *rb, double *x, double *y)
 

Macro Definition Documentation

◆ D

#define D   ((ax2 - ax1) * (by1 - by2) - (ay2 - ay1) * (bx1 - bx2))

◆ D1

#define D1   ((bx1 - ax1) * (by1 - by2) - (by1 - ay1) * (bx1 - bx2))

Definition at line 73 of file intersect.c.

Referenced by G_intersect_line_segments().

◆ D2

#define D2   ((ax2 - ax1) * (by1 - ay1) - (ay2 - ay1) * (bx1 - ax1))

Definition at line 74 of file intersect.c.

Referenced by G_intersect_line_segments().

◆ SWAP

#define SWAP ( x,
y )
Value:
{ \
double t; \
t = x; \
x = y; \
y = t; \
}
double t
#define x

Definition at line 76 of file intersect.c.

Referenced by G_intersect_line_segments().

Function Documentation

◆ G_intersect_line_segments()

int G_intersect_line_segments ( double ax1,
double ay1,
double ax2,
double ay2,
double bx1,
double by1,
double bx2,
double by2,
double * ra,
double * rb,
double * x,
double * y )

Definition at line 84 of file intersect.c.

References D, D1, D2, SWAP, and x.

Referenced by G_distance_between_line_segments(), and G_distance_point_to_line_segment().