RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Math.SumOfSquares Function

Returns the sum of the squared values from a data array.

Pascal
function SumOfSquares(const Data: array of Double): Extended;
C++
Extended SumOfSquares(const array of Double Data);

Math

SumOfSquares returns the sum of the squares of the Data values: Data[0]^2 + Data[1]^2 + Data[2]^2... In C++, the Data_Size parameter specifies the index of the last value in Data (one less than the number of values). 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!