Patch alteration and math util

Minor patch modification.

Moved the lerp to MathUtils and templated it to make it more useful in future.