コード例 #1
0
        public static double GetDistance(Vector2d point1, Vector2d point2)
        {
            var dX = point1.X - point2.X;
            var dY = point1.Y - point2.Y;

            return Math.Sqrt(dX * dX + dY * dY);
        }
コード例 #2
0
 public void AddTo(Vector2d force)
 {
     X += force.X;
     Y += force.Y;
 }