Jamba C++ API  6.3.0
Lerp.h File Reference
#include "Misc.h"

Go to the source code of this file.

Classes

class  Lerp< TFloat, X, Y >
 Util class to compute linear interpolation. More...
 
struct  Range< T >
 Defines a range of values. More...
 

Namespaces

 pongasoft
 
 pongasoft::Utils
 

Typedefs

using DPLerp = Lerp< double, double, double >
 
template<typename X >
using DPLerpX = Lerp< double, X, double >
 
template<typename X , typename Y >
using DPLerpXY = Lerp< double, X, Y >
 
template<typename Y >
using DPLerpY = Lerp< double, double, Y >
 
using SPLerp = Lerp< float, float, float >
 
template<typename X >
using SPLerpX = Lerp< float, X, float >
 
template<typename X , typename Y >
using SPLerpXY = Lerp< float, X, Y >
 
template<typename Y >
using SPLerpY = Lerp< float, float, Y >
 

Functions

template<typename X , typename Y >
static DPLerpXY< X, Y > mapRangeDPXY (X iFromLow, X iFromHigh, Y iToLow, Y iToHigh)
 Convenient shortcut for double precision. More...
 
template<typename X , typename Y >
static SPLerpXY< X, Y > mapRangeSPXY (X iFromLow, X iFromHigh, Y iToLow, Y iToHigh)
 Convenient shortcut for single precision. More...
 
static double mapValueDP (double iValue, double iFromLow, double iFromHigh, double iToLow, double iToHigh, bool iClamp=true)
 Convenient shortcut for single precision. More...
 
template<typename X >
static double mapValueDPX (X iValue, X iFromLow, X iFromHigh, double iToLow, double iToHigh, bool iClamp=true)
 Convenient shortcut for single precision. More...
 
template<typename X , typename Y >
static Y mapValueDPXY (X iValue, X iFromLow, X iFromHigh, Y iToLow, Y iToHigh, bool iClamp=true)
 Convenient shortcut for single precision. More...
 
template<typename Y >
static Y mapValueDPY (double iValue, double iFromLow, double iFromHigh, Y iToLow, Y iToHigh, bool iClamp=true)
 Convenient shortcut for single precision. More...
 
static float mapValueSP (float iValue, float iFromLow, float iFromHigh, float iToLow, float iToHigh, bool iClamp=true)
 Convenient shortcut for single precision. More...
 
template<typename X >
static float mapValueSPX (X iValue, X iFromLow, X iFromHigh, float iToLow, float iToHigh, bool iClamp=true)
 Convenient shortcut for single precision. More...
 
template<typename X , typename Y >
static Y mapValueSPXY (X iValue, X iFromLow, X iFromHigh, Y iToLow, Y iToHigh, bool iClamp=true)
 Convenient shortcut for single precision. More...
 
template<typename Y >
static Y mapValueSPY (float iValue, float iFromLow, float iFromHigh, Y iToLow, Y iToHigh, bool iClamp=true)
 Convenient shortcut for single precision. More...
 

Variables

constexpr auto mapRangeDP = mapRangeDPXY<double, double>
 
template<typename X >
constexpr auto mapRangeDPX = mapRangeDPXY<X, double>
 
template<typename Y >
constexpr auto mapRangeDPY = mapRangeDPXY<double, Y>
 
constexpr auto mapRangeSP = mapRangeSPXY<float, float>
 
template<typename X >
constexpr auto mapRangeSPX = mapRangeSPXY<X, float>
 
template<typename Y >
constexpr auto mapRangeSPY = mapRangeSPXY<float, Y>