New to Telerik UI for WinFormsStart a free 30-day trial

Provides static methods not included in the standard Math class.

Definition

Namespace:Telerik.WinForms.RichTextEditor

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public static class MathUtilities

Inheritance: objectMathUtilities

Methods

Restricts a value to be within a specified range.

C#
public static double Clamp(double value, double minimum, double maximum, int precision)
Parameters:valuedouble

The value to clamp.

minimumdouble

The minimum value.

maximumdouble

The maximum value.

precisionint

The rounding precision value.

Returns:

double

The clamped value.

Restricts a value to be within a specified range.

C#
public static double Clamp(double value, double min, double max)
Parameters:valuedouble

The value to clamp.

mindouble

The minimum value.

maxdouble

The maximum value.

Returns:

double

The clamped value.

Restricts a value to be within a specified range.

C#
public static int Clamp(int value, int min, int max)
Parameters:valueint

The value to clamp.

minint

The minimum value.

maxint

The maximum value.

Returns:

int

The clamped value.

C#
public static double CustomMod(double number)
Parameters:numberdoubleReturns:

double

C#
public static string IntegerToRomanString(int number)
Parameters:numberintReturns:

string

Checks if a value is within a specified range.

C#
public static bool IsInRange(int value, int min, int max)
Parameters:valueint

The value to check.

minint

The minimum value.

maxint

The maximum value.

Returns:

bool

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