Floating point math is in general pretty excellent. It generally has hardware support, and it is capable of representing both very large and very small numbers, and it has a fixed number of binary significant figures. It is generally a suitable approximation/replacement for a true "real" number in programming. But it does have some flaws. It is much more precise near zero, so if the numbers we want to represent have a small fixed range (say 0 to 1), the numbers near the 0 side will typically have less error than the other side of the range. Enter fixed point math.
A utility class to handle weighted blending of values, created for use in my transition to data-driven animations rather than hard-coded ones. A Blendable<T>
is just a wrapper around a T value
and a float weight
with some convenience functions to allow blending between them and applying the value from a starting point (the default animation pose, if you will).