public bool IsOnLine(Point point)
        {
            var calculator = new IsPointOnArcSegmentCalculator
            {
                ArcSegment = this,
                Point      = point
            };

            calculator.Calculate();


            return(calculator.IsPointOnArcSegment);
        }
        public void Calculate_DoesNothing_ForPointIsUnknown()
        {
            // Arrange
            var sut = new IsPointOnArcSegmentCalculator
            {
                ArcSegment = m_ArcSegment,
                Point      = Point.Unknown
            };

            // Act
            sut.Calculate();

            // Assert
            Assert.False(sut.IsPointOnArcSegment);
        }
        public void IsPointOnArcSegment_ReturnsTrue_ForStartPoint()
        {
            // Arrange
            var sut = new IsPointOnArcSegmentCalculator
            {
                ArcSegment = m_ArcSegment,
                Point      = m_StartPoint
            };

            // Act
            sut.Calculate();

            // Assert
            Assert.True(sut.IsPointOnArcSegment);
        }
        public void IsPointOnArcSegment_ReturnsTrue_ForHalfwayPoint()
        {
            // Arrange
            var halfway = new Point(6.0,
                                    3.0);
            var sut = new IsPointOnArcSegmentCalculator
            {
                ArcSegment = m_ArcSegment,
                Point      = halfway
            };

            // Act
            sut.Calculate();

            // Assert
            Assert.True(sut.IsPointOnArcSegment);
        }
        public void IsPointOnArcSegment_ReturnsFalse_ForHalfwayPointPlusDeltaTwoTimes()
        {
            // Arrange
            const double doubleDelta = SelkieConstants.EpsilonDistance * 2;
            var          halfway     = new Point(6.0 + doubleDelta,
                                                 3.0);
            var sut = new IsPointOnArcSegmentCalculator
            {
                ArcSegment = m_ArcSegment,
                Point      = halfway
            };

            // Act
            sut.Calculate();

            // Assert
            Assert.False(sut.IsPointOnArcSegment);
        }
        public void IsPointOnArcSegment_ReturnsFalse_ForPointBeforeStartPoint()
        {
            // Arrange
            Point point = PointOnCircle(m_ArcSegment,
                                        359.5);

            var sut = new IsPointOnArcSegmentCalculator
            {
                ArcSegment = m_ArcSegment,
                Point      = point
            };

            // Act
            sut.Calculate();

            // Assert
            Assert.False(sut.IsPointOnArcSegment);
        }