Class MathUtilities
Provides static methods not included in the standard Math class.
Inheritance
Inherited Members
Namespace: Telerik.WinForms.RichTextEditor
Assembly: Telerik.WinControls.RichTextEditor.dll
Syntax
public static class MathUtilities
Methods
Clamp(Double, Double, Double)
Restricts a value to be within a specified range.
Declaration
public static double Clamp(double value, double min, double max)
Parameters
System.Double
value
The value to clamp. |
System.Double
min
The minimum value. |
System.Double
max
The maximum value. |
Returns
System.Double
The clamped value. |
Clamp(Double, Double, Double, Int32)
Restricts a value to be within a specified range.
Declaration
public static double Clamp(double value, double minimum, double maximum, int precision)
Parameters
System.Double
value
The value to clamp. |
System.Double
minimum
The minimum value. |
System.Double
maximum
The maximum value. |
System.Int32
precision
The rounding precision value. |
Returns
System.Double
The clamped value. |
Clamp(Int32, Int32, Int32)
Restricts a value to be within a specified range.
Declaration
public static int Clamp(int value, int min, int max)
Parameters
System.Int32
value
The value to clamp. |
System.Int32
min
The minimum value. |
System.Int32
max
The maximum value. |
Returns
System.Int32
The clamped value. |
CustomMod(Double)
Declaration
public static double CustomMod(double number)
Parameters
System.Double
number
|
Returns
System.Double
|
IntegerToRomanString(Int32)
Declaration
public static string IntegerToRomanString(int number)
Parameters
System.Int32
number
|
Returns
System.String
|
IsInRange(Int32, Int32, Int32)
Checks if a value is within a specified range.
Declaration
public static bool IsInRange(int value, int min, int max)
Parameters
System.Int32
value
The value to check. |
System.Int32
min
The minimum value. |
System.Int32
max
The maximum value. |
Returns
System.Boolean
True if the values is within the range, false otherwise. |