Gin
Loading...
Searching...
No Matches
Interpolator< T > Struct Template Reference

How Animated blends and compares values of a type. More...

#include <gin_animated.h>

Static Public Member Functions

static T blend (const T &a, const T &b, float p)
static bool same (const T &a, const T &b)

Detailed Description

template<typename T>
struct Interpolator< T >

How Animated blends and compares values of a type.

The primary template works for any type with +, - and * float, like double or juce::Point<float>; specialise it for other types:

template <>
struct Interpolator<MyType>
{
static MyType blend (const MyType& a, const MyType& b, float p);
static bool same (const MyType& a, const MyType& b);
};
How Animated blends and compares values of a type.
Definition gin_animated.h:217
static T blend(const T &a, const T &b, float p)
Definition gin_animated.h:218
static bool same(const T &a, const T &b)
Definition gin_animated.h:219

Member Function Documentation

◆ blend()

template<typename T>
T Interpolator< T >::blend ( const T & a,
const T & b,
float p )
static

◆ same()

template<typename T>
bool Interpolator< T >::same ( const T & a,
const T & b )
static

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