Unravel Engine C++ Reference
Loading...
Searching...
No Matches
helper Namespace Reference

Namespaces

namespace  details
 

Classes

struct  is_chrono_duration
 
struct  is_chrono_duration< std::chrono::duration< R, P > >
 

Functions

template<typename T , std::enable_if_t< is_chrono_duration< T >::value, void * > = nullptr>
auto random_value (T min, T max) -> T
 
template<typename T >
random_value ()
 
template<typename T , std::enable_if_t< std::is_integral< T >::value, void * > = nullptr>
auto compare (const T &a, const T &b) -> bool
 
template<typename T , std::enable_if_t< std::is_floating_point< T >::value, void * > = nullptr>
auto compare (const T &a, const T &b, T epsilon=T(0.001)) -> bool
 

Function Documentation

◆ compare() [1/2]

template<typename T , std::enable_if_t< std::is_integral< T >::value, void * > = nullptr>
auto helper::compare ( const T & a,
const T & b ) -> bool
inline

Definition at line 50 of file tests_helper.h.

◆ compare() [2/2]

template<typename T , std::enable_if_t< std::is_floating_point< T >::value, void * > = nullptr>
auto helper::compare ( const T & a,
const T & b,
T epsilon = T(0.001) ) -> bool
inline

Definition at line 56 of file tests_helper.h.

◆ random_value() [1/2]

template<typename T >
T helper::random_value ( )
inline

Definition at line 44 of file tests_helper.h.

◆ random_value() [2/2]

template<typename T , std::enable_if_t< is_chrono_duration< T >::value, void * > = nullptr>
auto helper::random_value ( T min,
T max ) -> T
inline

Definition at line 23 of file tests_helper.h.