[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'matrix' (#rtl)

Tvector4_extended.length

Calculates the length of the vector.

Declaration

Source position: matrix.pp line 138

function Tvector4_extended.length: extended;

Description

Calculate the length of the vector: length=sqrt(data[0]**2+data[1]**2+data[2]**2+data[3]**2). Try to use squared_length if you are able to, as it is faster.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.