private static void MathCalculationTest() { Console.WriteLine(MathCalculations.CalcTriangleArea(3, 4, 5)); Console.WriteLine(MathCalculations.FindMax(5, -1, 3, 2, 14, 2, 3)); Console.WriteLine(MathCalculations.FindMax(new int[] { 5, -1, 3, 2, 14, 2, 3 })); }
private static void MathCalculationsClassTests() { Console.WriteLine(MathCalculations.CalculateTriangleArea(3, 4, 5)); Console.WriteLine(MathCalculations.FindMax(5, -1, 3, 2, 14, 2, 3)); Console.WriteLine(MathCalculations.CalculateDistanceBetweenTwoPoints(3, -1, 3, 2.5)); Console.WriteLine("Horizontal? " + MathCalculations.IsLineHorizontal(3, -1, 3, 2.5)); Console.WriteLine("Vertical? " + MathCalculations.IsLineVertical(3, -1, 3, 2.5)); }
private static void PointTest() { double x1 = 3; double y1 = -1; double x2 = 3; double y2 = 2.5; bool horizontal = MathCalculations.IsHorizontal(y1, y2); bool vertical = MathCalculations.IsVertical(x1, x2); Console.WriteLine(MathCalculations.CalcDistance(x1, y1, x2, y2)); Console.WriteLine("Horizontal? " + horizontal); Console.WriteLine("Vertical? " + vertical); }