#include <type_traits>
#include "base/angle.h"
#include "assert/assert.h"
Go to the source code of this file.
|
| template<typename T > |
| R< T > | eu::make_range (T min, T max) |
| | Create a range from min to max (inclusive)
|
| |
| template<typename T > |
| R< T > | eu::make_range (T max) |
| | Create a range from zero (0) to max (inclusive)
|
| |
| float | eu::from_01f (float lower_bound, float upper_bound, float value) |
| |
| template<typename T > |
| T | eu::from_01 (const R< T > &range, float value) |
| | Converts a value in 0-1 range to a custom range.
|
| |
| template<> |
| float | eu::from_01 (const R< float > &range, float value) |
| |
| template<typename T > |
| float | eu::to01 (const R< T > &range, T value) |
| | Converts a value in a range to the 0-1 range.
|
| |
| template<typename T > |
| T | eu::get360_angular (const R< T > &range, float value) |
| |
| template<typename T , typename F > |
| T | eu::remap_to (const R< F > &from, const R< T > &to, F value) |
| | Remaps a value from one range to another.
|
| |
| template<typename T > |
| bool | eu::is_within (const R< T > &range, T value) |
| | Returns true if a value is withing a range.
|
| |
| template<typename T > |
| T | eu::keep_within (const R< T > &range, T value) |
| | Returns a value that is kept within the range.
|
| |
| template<typename T > |
| T | eu::wrap (const R< T > &range, T value) |
| | Returns a value that wraps around the range.
|
| |