コード例 #1
0
        public Ecllipse(Point2D focusOne, Point2D focusTwo, double minorAxis = 0, double majorAxis = 0 )
        {

            this.FocusOne = focusOne;
            this.FocusTwo = focusTwo;
            this.MajorAxis = majorAxis;
            this.MinorAxis = minorAxis;

        }
コード例 #2
0
         public static double CalculateDistance2D(Point2D pointA,Point2D pointB)
         {

             double delatX = pointA.XCoordinate - pointB.XCoordinate;
             double deltaY = pointA.YCoordinate - pointB.YCoordinate;

             double distance = Math.Sqrt(delatX * delatX + deltaY * deltaY);

             return distance;

         }
コード例 #3
0
        public Square(Point2D location, double sideLength = 0)
        {

        }
コード例 #4
0
 public Rectangle(Point2D location, double width = 0, double height = 0)
 {
     this.Location = location;
     this.Width = width;
     this.Height = height;
 }