sds_distance

double sds_distance (const sds_point firstpt, const sds_point secondpt);


Determine the distance between these points.


This function returns the distance between two points: firstpt represents the coordinates of the first point, and secondpt is the second point. The distance function handles 2-D or 3-D.

This function returns the distance, in current drawing units, between the two points, as a real number.

Example

sds_real returnr;

sds_point firstpt,secondpt;

sds_getpoint(NULL,"\nFirst point for distance: ",firstpt);

sds_getpoint(firstpt,"\nSecond point: ",secondpt);

returnr=sds_distance(firstpt,secondpt);

sds_printf("\nThe distance is %f",returnr);

Tell me about...

Programming Overview of SDS™ (Solutions Development System™)

sds_getdist