System.Math.Mean

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Mean(const Data: array of Single): Single;
function Mean(const Data: array of Double): Double;
function Mean(const Data: array of Extended): Extended;

C++

extern DELPHI_PACKAGE float __fastcall Mean(const float *Data, const int Data_High)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Math.pas
System.Math.hpp
System.Math System.Math

Description

Returns the average of all values in an array.

Mean calculates the arithmetic average of all the values in the Data array parameter. In C++, the Data_High parameter gives the index of the last element of the array (one less than the number of elements).

See Also

Code Examples