Table of Contents

Class DecelerationTimingParameters

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll
public class DecelerationTimingParameters : ITimingParameters
Inheritance
DecelerationTimingParameters
Implements
Inherited Members
Extension Methods

Constructors

DecelerationTimingParameters(float, float, float, float)

public DecelerationTimingParameters(float initialValue, float initialVelocity, float decelerationRate, float threshold)

Parameters

initialValue float
initialVelocity float
decelerationRate float
threshold float

DecelerationTimingParameters(float, float, float, float, float)

Creates timing parameters specifically for scrolling to a target position in a specified time

public DecelerationTimingParameters(float currentValue, float targetValue, float durationSecs, float decelerationRate, float threshold = 0.1)

Parameters

currentValue float

The current position/value

targetValue float

The target position/value to scroll to

durationSecs float

The desired duration in seconds

decelerationRate float

The deceleration rate (between 0 and 1)

threshold float

The threshold for considering motion stopped

Properties

DecelerationK

public float DecelerationK { get; protected set; }

Property Value

float

DecelerationRate

public float DecelerationRate { get; protected set; }

Property Value

float

Destination

public float Destination { get; }

Property Value

float

DurationSecs

public float DurationSecs { get; }

Property Value

float

InitialValue

public float InitialValue { get; set; }

Property Value

float

InitialVelocity

public float InitialVelocity { get; set; }

Property Value

float

Threshold

public float Threshold { get; set; }

Property Value

float

Methods

DurationToValue(float)

public double DurationToValue(float value)

Parameters

value float

Returns

double

ValueAt(float)

public float ValueAt(float offsetSecs)

Parameters

offsetSecs float

Returns

float

VelocityAt(double)

public float VelocityAt(double time)

Parameters

time double

Returns

float

VelocityTo(float, float, double)

public float VelocityTo(float startingPoint, float targetPoint, double time)

Parameters

startingPoint float
targetPoint float
time double

Returns

float

VelocityToZero(float, float, float, float)

public float VelocityToZero(float startingPoint, float targetPoint, float maxTimeSecs = 0, float epsilon = 1E-06)

Parameters

startingPoint float
targetPoint float
maxTimeSecs float
epsilon float

Returns

float