GEOcmpPointsWithTolerance

Top  Previous  Next

Comparison of two points.

With this function two points are checked for equality within the scope of the given tolerance. The tolerance is the distance of both points according to Pythagoras.

Parametre

x1 (stands in) [IN]

y1 (stands in) [IN]

Co-ordinates of the first point.

x2 (stands in) [IN]

y2 (stands in) [IN]

Co-ordinates of the second point.

tolerance (stands in) [IN]

Exactness for comparison.

Result

(int) [OUT]

1: Points are identical within the given tolerance

0: Sharp have passed away

Declaration

#include "basic.h"

 

int DLLENTRY GEOcmpPointsWithTolerance (

stand in x1,

stand in y1,

stand in x2,

stand in y2,

stand in tolerance

);

Example

status = GEOcmpPointsWithTolerance (4.101, 5.5, 4.102, 5.5, 0.01)

By call with these values the function delivers the value 1 (TRUE) back, i.e. the point are identical in within the tolerance. The difference (0.003) is smaller than the given arithmetic exactness (0.01).

status = GEOcmpPointsWithTolerance (4.101, 5.5, 4.102, 5.5, 0.001)

By call with these values the function delivers the value 0 (FALSE) back, i.e. the point have passed away in within the tolerance. The difference (0.003) is bigger than the given arithmetic exactness (0.001).