Class MathHelper
Class MathHelper.
Inherited Members
Namespace: VisioForge.Core.Helpers
Assembly: VisioForge.Core.dll
Syntax
public static class MathHelper
Methods
Clamp<T>(T, T, T)
Clamps the specified minimum.
Declaration
public static T Clamp<T>(this T val, T min, T max) where T : IComparable<T>
Parameters
| Type | Name | Description |
|---|---|---|
| T | val | The value. |
| T | min | The minimum. |
| T | max | The maximum. |
Returns
| Type | Description |
|---|---|
| T | T. |
Type Parameters
| Name | Description |
|---|---|
| T |
DegreesToRadians(double)
Degreeses to radians.
Declaration
public static double DegreesToRadians(double degrees)
Parameters
| Type | Name | Description |
|---|---|---|
| double | degrees | The degrees. |
Returns
| Type | Description |
|---|---|
| double | System.Double. |
GenRange(int, int, int)
Ranges the specified minimum.
Declaration
public static IEnumerable<int> GenRange(int min, int max, int step)
Parameters
| Type | Name | Description |
|---|---|---|
| int | min | The minimum. |
| int | max | The maximum. |
| int | step | The step. |
Returns
| Type | Description |
|---|---|
| IEnumerable<int> | IEnumerable<System.Int32>. |
HighWord(uint)
Highes the word.
Declaration
public static uint HighWord(this uint number)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | number | The number. |
Returns
| Type | Description |
|---|---|
| uint | System.UInt32. |
Hypot(double, double)
Hypotenuse.
Declaration
public static double Hypot(double x, double y)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | The x. |
| double | y | The y. |
Returns
| Type | Description |
|---|---|
| double | System.Double. |
IsIntInRange(int, int, int)
Determines whether integer is in range.
Declaration
public static bool IsIntInRange(int value, int min, int max)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The value. |
| int | min | The minimum. |
| int | max | The maximum. |
Returns
| Type | Description |
|---|---|
| bool |
LowWord(uint)
Lows the word.
Declaration
public static uint LowWord(this uint number)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | number | The number. |
Returns
| Type | Description |
|---|---|
| uint | System.UInt32. |
RoundToSpecial(int, int)
Declaration
public static int RoundToSpecial(int value, int roundTo)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | |
| int | roundTo |
Returns
| Type | Description |
|---|---|
| int |