Ejemplo n.º 1
0
 public Circle([NotNull] Point centrePoint,
               double radius)
 {
     m_CentrePoint = centrePoint;
     m_Radius      = radius;
     m_Calculator  = new CircleCentreToPointCalculator(CentrePoint);
 }
Ejemplo n.º 2
0
        public void Setup()
        {
            m_CentrePoint = new Point(3.0,
                                      4.0);
            m_Point = new Point(5.0,
                                4.0);
            m_RadiusOne = 2.0;

            m_Calculator = new CircleCentreToPointCalculator(m_CentrePoint,
                                                             m_Point);
        }
Ejemplo n.º 3
0
        public void CalculateForPointUnknownTest()
        {
            var calculator = new CircleCentreToPointCalculator(new Point(0.0,
                                                                         0.0),
                                                               Point.Unknown);

            Assert.AreEqual(Angle.ForZeroDegrees,
                            calculator.AngleRelativeToYAxisCounterclockwise,
                            "RadiansRelativeToYAxisCounterclockwise");
            Assert.AreEqual(Angle.ForZeroDegrees,
                            calculator.AngleRelativeToYAxisClockwise,
                            "RadiansRelativeToYAxisClockwise");
            Assert.AreEqual(Angle.ForZeroDegrees,
                            calculator.AngleRelativeToYAxisCounterclockwise,
                            "RadiansRelativeToYAxisCounterclockwise");
        }
Ejemplo n.º 4
0
 private Circle()
 {
     IsUnknown     = true;
     m_CentrePoint = Point.Unknown;
     m_Calculator  = new CircleCentreToPointCalculator(CentrePoint);
 }