Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
lampda::utils::curves::ExponentialCurve< T, U > Class Template Reference

Given two points and an exponent, fit an exponential function. More...

#include <curves.h>

Public Types

using point_t = Point< T, U >
 point in the exponential curve
 

Public Member Functions

 ExponentialCurve (const point_t &pointA, const point_t &pointB, const double exponent=15.0)
 Exponential curve fitting to two points.
 
float sample (const T x) const
 Sample the exponential curve. Be aware that the result is always casted from a floating point !! -> for integer types, it will be the same as calling "floor()" on the result.
 

Detailed Description

template<typename T, typename U>
class lampda::utils::curves::ExponentialCurve< T, U >

Given two points and an exponent, fit an exponential function.

Parameters
[in]TType of X coordinates
[in]Utype of Y coordinates

Constructor & Destructor Documentation

◆ ExponentialCurve()

template<typename T , typename U >
lampda::utils::curves::ExponentialCurve< T, U >::ExponentialCurve ( const point_t pointA,
const point_t pointB,
const double  exponent = 15.0 
)
inline

Exponential curve fitting to two points.

Parameters
[in]pointAStart point of the curve
[in]pointBEnd point of the curve
[in]exponentThe strenght factor of this exponential. Set to 1 for a linear curve, > 1 gives strong exponential, < 1 gives log curves

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