The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



DistFromEllipse


Unit: SDL_math1
Class: None
Declaration: function DistFromEllipse (RefPos: TPointDouble; CentX, CentY, HorizAxLeng, VertAxLeng: double; var CloseP: TPointDouble): double;

The function DistFromEllipse calculates the distance of the reference point RefPos from an ellipse. The ellipse is specified by the its center (parameters CentX and CentY) and the lengths of the half axes (HorizAxLeng and VertAxLeng). The function returns the distance from the nearest point along the ellipse. The coordinates of the closest point is returned in the variable parameter CloseP.



Last Update: 2017-Sep-11