예제 #1
0
파일: Points.cs 프로젝트: uxifiit/UXC
        /// <summary>
        /// Returns distance between this and another point.
        /// </summary>
        /// <param name="?"></param>
        public double DistanceFrom(PointTwoD other)
        {
            double difx = this.X - other.X;
            double dify = this.Y - other.Y;

            return(Math.Sqrt(difx * difx + dify * dify));
        }
예제 #2
0
파일: Points.cs 프로젝트: uxifiit/UXC
 /// <summary>
 /// Creates an instance of the PointTwoD as a copy of the given instance.
 /// </summary>
 public PointTwoD(PointTwoD point)
     : this(point.X, point.Y)
 {
 }