namespace BOTWToolset { /// /// Extensions for Math. /// static class MathExt { /// /// Linearly interpolates a value. /// /// Value to interpolate. /// Value to interpolate to. /// Amount to interpolate - should be between 0 and 1. /// public static float Lerp(float from, float to, float delta) { if (delta > 1) return to; if (delta < 0) return from; return from + (to - from) * delta; } } }