Example #1
0
        private double GetDistance(TouchCollection touches, Vector2 center)
        {
            if (touches.Count == 0)
            {
                return(1);
            }
            float distance = touches.Sum(touch => Vector2.Distance(center, touch.Position));

            return(distance / touches.Count);
        }
Example #2
0
 private double GetDistance(TouchCollection touches, Vector2 center)
 {
     if (touches.Count == 0) return 1;
     float distance = touches.Sum(touch => Vector2.Distance(center, touch.Position));
     return distance / touches.Count;
 }