Table of Contents

Method CoerceValue

Namespace
Alternet.Editor.Wpf
Assembly
Alternet.Editor.Wpf.v9.dll

CoerceValue(double, double, double)

Forces the value to stay between minimum and maximum.

public static double CoerceValue(this double value, double minimum, double maximum)

Parameters

value double

Value to process.

minimum double

Possible minimum.

maximum double

Possible maximum.

Returns

double

Minimum, if value is less than minimum. Maximum, if value is greater than maximum. Otherwise, value.

CoerceValue(int, int, int)

Forces the value to stay between minimum and maximum.

public static int CoerceValue(this int value, int minimum, int maximum)

Parameters

value int

Value to process.

minimum int

Possible minimum.

maximum int

Possible maximum.

Returns

int

Minimum, if value is less than minimum. Maximum, if value is greater than maximum. Otherwise, value.