/// <summary> /// Retrieves the average absolute difference between this and the provided instance /// </summary> /// <param name="target"></param> /// <returns></returns> public float GetAvgDifference(CharacterPositionEventArgs target) { var diffX = Math.Abs(target.X - this.X); var diffY = Math.Abs(target.Y - this.Y); var diffZ = Math.Abs(target.Z - this.Z); return((diffX + diffY + diffZ) / 3); }
/// <summary> /// Retrieves the average absolute difference between this and the provided instance /// </summary> /// <param name="target"></param> /// <returns></returns> public float GetAvgDifference(CharacterPositionEventArgs target) { var diffX = Math.Abs(target.X - this.X); var diffY = Math.Abs(target.Y - this.Y); var diffZ = Math.Abs(target.Z - this.Z); return (diffX + diffY + diffZ) / 3; }