Table of Contents

Class Ramp

Namespace
Pamoja.Kit
Assembly
Pamoja.Kit.dll

Limits how fast a value may change, so a load is never slammed.

public sealed class Ramp : IDisposable
Inheritance
Ramp
Implements
Inherited Members

Remarks

Jumping a motor or a valve straight to a new target draws a surge and wears the mechanism; a ramp walks it there instead.

Constructors

Ramp(float, float)

Creates a rate limiter.

public Ramp(float start, float maxStep)

Parameters

start float

The value to start at.

maxStep float

The largest change allowed in one step.

Properties

Value

Gets the current value.

public float Value { get; }

Property Value

float

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Set(float)

Forces the value without rate limiting.

public void Set(float value)

Parameters

value float

The value to jump to.

Update(float)

Moves one step toward a target and returns the new value.

public float Update(float target)

Parameters

target float

The value being approached.

Returns

float

The rate-limited value.