Class
MathUtilities

Provides static methods not included in the standard Math class.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
public static class MathUtilities

Inheritance: objectMathUtilities

Methods

Clamp(double, double, double)

Restricts a value to be within a specified range.

Declaration

cs-api-definition
public static double Clamp(double value, double min, double max)

Parameters

value

double

The value to clamp.

min

double

The minimum value.

max

double

The maximum value.

Returns

double

The clamped value.

Clamp(double, double, double, int)

Restricts a value to be within a specified range.

Declaration

cs-api-definition
public static double Clamp(double value, double minimum, double maximum, int precision)

Parameters

value

double

The value to clamp.

minimum

double

The minimum value.

maximum

double

The maximum value.

precision

int

The rounding precision value.

Returns

double

The clamped value.

Clamp(int, int, int)

Restricts a value to be within a specified range.

Declaration

cs-api-definition
public static int Clamp(int value, int min, int max)

Parameters

value

int

The value to clamp.

min

int

The minimum value.

max

int

The maximum value.

Returns

int

The clamped value.

IsInRange(int, int, int)

Checks if a value is within a specified range.

Declaration

cs-api-definition
public static bool IsInRange(int value, int min, int max)

Parameters

value

int

The value to check.

min

int

The minimum value.

max

int

The maximum value.

Returns

bool

True if the values is within the range, false otherwise.