Class FloatExtensions
Extension methods for float type.
Namespace: Evergine.Mathematics
Assembly: Evergine.Mathematics.dll
Syntax
public static class FloatExtensions
Fields
DefaultFloatError
Default error.
Declaration
public const float DefaultFloatError = 5.9604645E-06
Field Value
| Type | Description |
|---|---|
| float |
Methods
Distinct(float, float, float)
Distinguishes the specified values.
Declaration
public static bool Distinct(this float a, float b, float maxRelativeError = 5.9604645E-06)
Parameters
| Type | Name | Description |
|---|---|---|
| float | a | First float. |
| float | b | Second float. |
| float | maxRelativeError | The maximum relative error. |
Returns
| Type | Description |
|---|---|
| bool | true if they are distinct. |
Equal(float, float, float)
Equals the specified a.
Declaration
public static bool Equal(this float a, float b, float maxRelativeError = 5.9604645E-06)
Parameters
| Type | Name | Description |
|---|---|---|
| float | a | First float. |
| float | b | Second float. |
| float | maxRelativeError | The maximum relative error. |
Returns
| Type | Description |
|---|---|
| bool | true if they are equal. |