Пример #1
0
        public static void CrossProduct(double magnitudeX1, double magnitudeY1, double magnitudeX2, double magnitudeY2, double 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.CrossProduct(segment1, segment2), Tolerance);
        }