Ensage.Common.Prediction.IsTurning C# (CSharp) Method

IsTurning() public static method

Checks if a unit is currently changing their direction
public static IsTurning ( Unit unit, double tolerancy ) : bool
unit Unit /// The unit. ///
tolerancy double /// tolerancy of rotation speed ///
return bool
        public static bool IsTurning(Unit unit, double tolerancy = 0)
        {
            double rotSpeed;
            if (!RotSpeedDictionary.TryGetValue(unit.Handle, out rotSpeed))
            {
                return false;
            }

            return Math.Abs(rotSpeed) > tolerancy;
        }