Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
MCore::Compare< T > Class Template Reference

#include <Compare.h>

Static Public Member Functions

static MCORE_INLINE bool CheckIfIsClose (const T &a, const T &b, float threshold)
 

Detailed Description

template<class T>
class MCore::Compare< T >

The class used to check differences between given objects. The differences are all represented as floats. This class can be useful in some specific algorithms used for optimizing data sets. Partial template specialization is used to calculate differences between custom object types. There is already support provided for a number of types, such as floats, ints and vectors.

Member Function Documentation

◆ CheckIfIsClose()

template<class T >
static MCORE_INLINE bool MCore::Compare< T >::CheckIfIsClose ( const T &  a,
const T &  b,
float  threshold 
)
static

Check if two given values are close to eachother or not.

Parameters
aThe first value.
bThe second value.
thresholdThe maximum error threshold value.
Note
Partial template specialization MUST be used to define behavior for the given type.

The documentation for this class was generated from the following file: