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:property Leng: double;

The property Leng is a read-only property in the class TIntVector returning the length of the vector. In the class TVector it can be used to both calculate the length of a vector and to set the length of a vector to a given value. Setting the length of a zero-length vector is ignored. Setting the length of a vector to 1.0 is equal to normalizing this vector.


Example: The statement L := Vec1.Leng; calculates the length of the vector Vec1 and assigns it to the variable L.

Example: This property is used in the following example program (see for downloading the code): testvec

Last Update: 2020-Aug-14