Class FloatExtensions
Extension methods for the .Net Float struct
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public static class FloatExtensions
Methods
Approximately(Single, Single, Single)
Checks if two numbers are approximately equal. Similar to Mathf.Approximately(float, float), but the tolerance can be specified.
Declaration
public static bool Approximately(this float number, float other, float tolerance)
Parameters
Type | Name | Description |
---|---|---|
Single | number | One of the numbers to compare. |
Single | other | The other number to compare. |
Single | tolerance | The amount of tolerance to allow while still considering the numbers approximately equal. |
Returns
Type | Description |
---|---|
Boolean | True if the difference between the numbers is less than or equal to the tolerance, false otherwise. |