#include <MathUtils.h>
|
| static bool | isNear (float x, float y, float absolute_tolerance, float relative_tolerance) |
| |
| static bool | isNear (float x, float y) |
| |
| static bool | isNear (double x, double y, double absolute_tolerance, double relative_tolerance) |
| |
| static bool | isNear (double x, double y) |
| |
Set of utility functions to compare floating point values.
◆ isNear() [1/4]
| static bool myscript::iink::MathUtils::isNear |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
absolute_tolerance, |
|
|
float |
relative_tolerance |
|
) |
| |
|
static |
Compares two values and returns true if they are near each other.
- Parameters
-
| x | the first value to compare. |
| y | the second value to compare. |
| absolute_tolerance | the absolute tolerance for the comparison. |
| relative_tolerance | the relative tolerance for the comparison. |
- Returns
true if x and y are near, false otherwise.
◆ isNear() [2/4]
| static bool myscript::iink::MathUtils::isNear |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
static |
Compares two values and returns true if they are near each other. Tolerance is the the difference between 1.0 and the next representable value of the given floating-point type.
- Parameters
-
| x | the first value to compare. |
| y | the second value to compare. |
- Returns
true if x and y are near, false otherwise.
◆ isNear() [3/4]
| static bool myscript::iink::MathUtils::isNear |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
absolute_tolerance, |
|
|
double |
relative_tolerance |
|
) |
| |
|
static |
Compares two values and returns true if they are near each other.
- Parameters
-
| x | the first value to compare. |
| y | the second value to compare. |
| absolute_tolerance | the absolute tolerance for the comparison. |
| relative_tolerance | the relative tolerance for the comparison. |
- Returns
true if x and y are near, false otherwise.
◆ isNear() [4/4]
| static bool myscript::iink::MathUtils::isNear |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
static |
Compares two values and returns true if they are near each other. Tolerance is the the difference between 1.0 and the next representable value of the given double-point type.
- Parameters
-
| x | the first value to compare. |
| y | the second value to compare. |
- Returns
true if x and y are near, false otherwise.
The documentation for this class was generated from the following file: