System.Beacon.TMeanCalculator.AddGetValue

From RAD Studio API Documentation
Jump to: navigation, search

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 of T before it calculates the result.
  • IsMoving: Indicates whether the beacon is moving. This affects the way AddGetValue calculates the result.
    • If IsMoving is True the result is the mean of the array of T.
    Note: If the array of T is full, AddGetValue empties the array of T before adding the provided value to the array of T. This improves the accuracy of the calculated value when the beacon is moving.
    • If IsMoving is False and the array of T is not full, the result is the mean of the array of T.
    • If IsMoving is False and the array of T is full, the result is the median of the array of T.

This function calls Get.

See Also