Changes to improve understandability of code

This commit is contained in:
David Jiménez
2015-03-28 07:36:39 +01:00
committed by reaperrr
parent 1d9c6251c0
commit 5109848215
2 changed files with 15 additions and 11 deletions

View File

@@ -35,6 +35,9 @@ namespace OpenRA
public static bool operator ==(WPos me, WPos other) { return me.X == other.X && me.Y == other.Y && me.Z == other.Z; }
public static bool operator !=(WPos me, WPos other) { return !(me == other); }
/// <summary>
/// Returns the linear interpolation between points 'a' and 'b'
/// </summary>
public static WPos Lerp(WPos a, WPos b, int mul, int div) { return a + (b - a) * mul / div; }
public static WPos LerpQuadratic(WPos a, WPos b, WAngle pitch, int mul, int div)