GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
linecros.c File Reference
#include <stdio.h>
Include dependency graph for linecros.c:

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))
 

Functions

int dig_test_for_intersection (double ax1, double ay1, double ax2, double ay2, double bx1, double by1, double bx2, double by2)
 
int dig_find_intersection (double ax1, double ay1, double ax2, double ay2, double bx1, double by1, double bx2, double by2, double *x, double *y)
 

Macro Definition Documentation

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

Definition at line 51 of file linecros.c.

Referenced by dig_find_intersection(), and dig_test_for_intersection().

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

Definition at line 53 of file linecros.c.

Referenced by dig_find_intersection(), and dig_test_for_intersection().

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

Definition at line 55 of file linecros.c.

Referenced by dig_find_intersection(), and dig_test_for_intersection().

Function Documentation

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

Definition at line 103 of file linecros.c.

References D, D1, and D2.

int dig_test_for_intersection ( double  ax1,
double  ay1,
double  ax2,
double  ay2,
double  bx1,
double  by1,
double  bx2,
double  by2 
)

Definition at line 58 of file linecros.c.

References D, D1, and D2.