Move math utilities to OpenNest.Math namespace

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 12:51:16 -05:00
parent 2210f60656
commit 8d9aebb83f
40 changed files with 172 additions and 140 deletions

View File

@@ -0,0 +1,40 @@
using System;
namespace OpenNest.Math
{
public static class Trigonometry
{
/// <summary>
///
/// </summary>
/// <param name="height">Height</param>
/// <param name="hypotenuse">Hypotenuse</param>
/// <returns></returns>
public static double Base(double height, double hypotenuse)
{
return System.Math.Sqrt(hypotenuse * hypotenuse - height * height);
}
/// <summary>
///
/// </summary>
/// <param name="bottom">Base</param>
/// <param name="hypotenuse">Hypotenuse</param>
/// <returns></returns>
public static double Height(double bottom, double hypotenuse)
{
return System.Math.Sqrt(hypotenuse * hypotenuse - bottom * bottom);
}
/// <summary>
///
/// </summary>
/// <param name="height">Height</param>
/// <param name="bottom">Base</param>
/// <returns></returns>
public static double Hypotenuse(double height, double bottom)
{
return System.Math.Sqrt(height * height + bottom * bottom);
}
}
}