added things

This commit is contained in:
didier amyot committed 2023-08-15 09:28:29 -04:00
1 parent eed3373822
commit 021aa017f3
6 files changed
+159 -18

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
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;
}
}