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


Class: TVector, TIntVector
Declaration: function EuclideanDistance (OtherVec: TVector): double; { class TVector }
function EuclideanDistance (OtherVec: TIntVector): integer; { class TIntVector }

The function EuclideanDistance calculates and returns the Euclidean distance between two points in n-dimensional space, given by the two vectors self and OtherVec. If the dimensions of the two vectors do not match, an exception is generated ('vectors have different dimensions').

Last Update: 2023-Feb-06