UtilsCalculate Delta(UInt 16, UInt 16) Method
Calculates the delta of the current and previous values. Rollover is accounted for and a positive integer is always returned.
Add the returned value to the accumulated value in the derived class. The last value is updated with the current value.
Definition
Namespace: SmallEarthTech.AntPlus
Assembly: SmallEarthTech.AntPlus (in SmallEarthTech.AntPlus.dll) Version: 6.0.4+3bc433b476ad11fc6896cfd0bd783d60504dc315
Positive delta of the current and previous values.
Assembly: SmallEarthTech.AntPlus (in SmallEarthTech.AntPlus.dll) Version: 6.0.4+3bc433b476ad11fc6896cfd0bd783d60504dc315
C#
public static int CalculateDelta(
ushort currentValue,
ref ushort lastValue
)VB
Public Shared Function CalculateDelta (
currentValue As UShort,
ByRef lastValue As UShort
) As IntegerC++
public:
static int CalculateDelta(
unsigned short currentValue,
unsigned short% lastValue
)F#
static member CalculateDelta :
currentValue : uint16 *
lastValue : uint16 byref -> int Parameters
Return Value
Int32Positive delta of the current and previous values.