![]() |
The Stroop Test Game
Game Physics with a 2D Physics Engine
|
Code for the vector field CVectorField.
#include "SageComponentIncludes.h"#include "VectorField.h"#include "Box2DRenderer.h"#include "GameDefines.h"
Functions | |
| template<typename t > | |
| t | lerp (const t &a, const t &b, float f) |
| 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.
| a | First number. |
| b | Second number. |
| f | Fraction, should be between 0 and 1. |
