Esempio n. 1
0
        [TestCase(1.1, 2.2, -2.1, -4.2, false)] // Sloped Pointing Opposite Way
        public static void IsConvex(
            double magnitudeX1, double magnitudeY1,
            double magnitudeX2, double magnitudeY2, bool expectedResult)
        {
            LineSegment segment1 = new LineSegment(new CartesianCoordinate(0, 0), new CartesianCoordinate(magnitudeX1, magnitudeY1));
            LineSegment segment2 = new LineSegment(new CartesianCoordinate(0, 0), new CartesianCoordinate(magnitudeX2, magnitudeY2));

            Assert.AreEqual(expectedResult, GeometryLibrary.IsConvex(segment1, segment2, Tolerance));
        }