System.Beacon.TMeanCalculator.AddGetValue
Delphi
function AddGetValue(AValue: T; IsMoving: Boolean): T;
C++
T __fastcall AddGetValue(T AValue, bool IsMoving);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Beacon.pas System.Beacon.hpp |
System.Beacon | TMeanCalculator |
Description
Calculates a stabilized value from the array of T
and returns the calculated value.
Accepts the following parameters:
AValue
: AddGetValue adds the provided value to the array ofT
before it calculates the result.IsMoving
: Indicates whether the beacon is moving. This affects the way AddGetValue calculates the result.- If
IsMoving
isTrue
the result is the mean of the array ofT
.
- Note: If the array of
T
is full, AddGetValue empties the array ofT
before adding the provided value to the array ofT
. This improves the accuracy of the calculated value when the beacon is moving.
- If
IsMoving
isFalse
and the array ofT
is not full, the result is the mean of the array ofT
. - If
IsMoving
isFalse
and the array ofT
is full, the result is the median of the array ofT
.
- If
This function calls Get.