Files
FirstProject/Algorithms/TrigonometryUtil.cs
2023-08-15 09:28:29 -04:00

23 lines
571 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Algorithms;
class TrigonometryUtil {
public static double Side(double hypothenuse, double otherSide){
return Math.Sqrt(hypothenuse * hypothenuse - otherSide * otherSide);
}
public static double Hypothenuse(double a, double b){
return Math.Sqrt(a * a + b * b);
}
public static double Area(double hypothenuse, double side){
double otherSide = Side(hypothenuse, side);
return side * otherSide * 0.5;
}
}