- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# FMath/FMFloat.h File Reference

The file containing functions and constants for floating point values. More...

Go to the source code of this file.

## Defines
#define | DBL_TOLERANCE 0.0001
| The default tolerance for double-sized floating-point comparison functions.
#define | FLT_TOLERANCE 0.0001f
| The default tolerance for single-sized floating-point comparison functions.
#define | FLT_MAX __FLT_MAX__
| The maximum value that can be expressed using a 32-bit floating point value.
## Functions
bool | IsEquivalent (float f1, float f2)
| Returns whether two floating-point values are equivalent within a given tolerance.
bool | IsEquivalent (float f1, float f2, float tolerance)
| Returns whether two floating-point values are equivalent within a given tolerance.
bool | IsEquivalent (double f1, double f2)
| Returns whether two double-sized floating-point values are equivalent.
bool | IsEquivalent (double f1, double f2, double tolerance)
| Returns whether two double-sized floating-point values are equivalent within a given tolerance.

## Detailed Description

The file containing functions and constants for floating point values.

## Define Documentation

#define FLT_MAX __FLT_MAX__

| The maximum value that can be expressed using a 32-bit floating point value. This macro is pre-defined in the Windows API but is missing on MacOSX and other platforms.

## Function Documentation

bool IsEquivalent | ( | double | f1,
|  | double | f2,
|  | double | tolerance
| ) | `[inline]`

  | Returns whether two double-sized floating-point values are equivalent within a given tolerance. Parameters:
  | f1 | A first double-sized floating-point value.
  | f2 | A second double-sized floating-point value.
  | tolerance | The tolerance in which to accept the two double-sized floating-point values as equivalent.

bool IsEquivalent | ( | double | f1,
|  | double | f2
| ) | `[inline]`

  | Returns whether two double-sized floating-point values are equivalent. Parameters:
  | f1 | A first double-sized floating-point value.
  | f2 | A second double-sized floating-point value.

bool IsEquivalent | ( | float | f1,
|  | float | f2,
|  | float | tolerance
| ) | `[inline]`

  | Returns whether two floating-point values are equivalent within a given tolerance. Parameters:
  | f1 | A first floating-point value.
  | f2 | A second floating-point value.
  | tolerance | The tolerance in which to accept the two floating-point values as equivalent.

bool IsEquivalent | ( | float | f1,
|  | float | f2
| ) | `[inline]`

  | Returns whether two floating-point values are equivalent within a given tolerance. Parameters:
  | f1 | A first floating-point value.
  | f2 | A second floating-point value.