The Stroop Test Game
Ian Parberry's "Introduction to Game Physics"
Functions
VectorField.cpp File Reference

Code for the vector field CVectorField. More...

#include "VectorField.h"
#include "GameDefines.h"
#include "Renderer.h"
#include "ComponentIncludes.h"

Functions

template<typename t >
lerp (const t &a, const t &b, float f)
 

Detailed Description

Code for the vector field CVectorField.

Function Documentation

◆ lerp()

template<typename t >
t lerp ( const t &  a,
const t &  b,
float  f 
)

Templated helper function that linearly interpolates between two numbers. Type t can be anything that supports multiplication, addition, and subtraction.

Parameters
aFirst number.
bSecond number.
fFraction, should be between 0 and 1.
Returns
A number linearly interpolated between a and b with an f-fraction of b.