EqualPt
EqualPt Check if two points are identical Point point1 ; points to . . . Point point2 ; . . . compare returns Are the points identical?
EqualPt compares the coordinates of two points and returns an indication whether they are identical. This function is used if you have no need
whatsoever of execution speed.
point1 and . . .
point2 are 4-byte Point structures. Returns: a Boolean indicating whether the points are identical. It is one of:
Notes: EqualPt can be used to make your code more readable. The sequence: ... they are equal ...
}
is functionally equivalent to:
if ( (pt1.h == pt2.h) && (pt1.v==pt2.v) ) { /* compare shorts twice
*/
... they are equal ...
}
or the more efficient:
if ( *(long *)&pt1 == *(long *)&pt2) { /* compare longs once */
... they are equal ...
}