summaryrefslogtreecommitdiffhomepage
path: root/dev/Modules/FB/Math.h
blob: 3ccbaf5dbb071c82c6589ee4797283d367d9a6cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* -------------------------------------------

	Copyright ZKA Technologies.

------------------------------------------- */

#pragma once

/// @file Math.h
/// @brief Linear interpolation implementation.

typedef float CGReal;

/// @brief Linear interpolation equation solver.
/// @param from where?
/// @param to to?
/// @param at which state we're at **to**.
inline CGReal CGLerp(CGReal to, CGReal from, CGReal stat)
{
	CGReal difference = to - from;
	return from + (difference * stat);
}