Class MathUtils
Namespace: Aurigma.DesignAtoms.ImageProcessing.LineWidthMeasuring.Math
Assembly: Aurigma.DesignAtoms.ImageProcessing.dll
Syntax
public static class MathUtils
Inheritance: System.Object -> MathUtils
Inherited Members
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Methods
Distance
public static float Distance(float x1, float y1, float x2, float y2)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | x1 | |
System.Single | y1 | |
System.Single | x2 | |
System.Single | y2 |
Returns
System.Single
Distance
public static float Distance(IPointInt point1, IPointInt point2)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.ImageProcessing.LineWidthMeasuring.IPointInt | point1 | |
| Aurigma.DesignAtoms.ImageProcessing.LineWidthMeasuring.IPointInt | point2 |
Returns
System.Single
Distance
public static float Distance(VectorF a, VectorF b)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.ImageProcessing.LineWidthMeasuring.Math.VectorF | a | |
| Aurigma.DesignAtoms.ImageProcessing.LineWidthMeasuring.Math.VectorF | b |
Returns
System.Single
LineSlope
public static float LineSlope(VectorF direction)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.ImageProcessing.LineWidthMeasuring.Math.VectorF | direction |
Returns
System.Single
DotProduct
public static float DotProduct(VectorF a, VectorF b)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.ImageProcessing.LineWidthMeasuring.Math.VectorF | a | |
| Aurigma.DesignAtoms.ImageProcessing.LineWidthMeasuring.Math.VectorF | b |
Returns
System.Single
Clamp
public static double Clamp(double value, double min, double max)
Parameters
| Type | Name | Description |
|---|---|---|
System.Double | value | |
System.Double | min | |
System.Double | max |
Returns
System.Double
Clamp
public static int Clamp(int value, int min, int max)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | value | |
System.Int32 | min | |
System.Int32 | max |
Returns
System.Int32
NearlyEquals
public static bool NearlyEquals(this float number, float other, float epsilon = 1E-06F)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | number | |
System.Single | other | |
System.Single | epsilon |
Returns
System.Boolean