SohCahToa 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SohCahToa --version 2.0.0                
NuGet\Install-Package SohCahToa -Version 2.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SohCahToa" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SohCahToa --version 2.0.0                
#r "nuget: SohCahToa, 2.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SohCahToa as a Cake Addin
#addin nuget:?package=SohCahToa&version=2.0.0

// Install SohCahToa as a Cake Tool
#tool nuget:?package=SohCahToa&version=2.0.0                

SohCahToa

NuGet version (SohCahToa)

SohCahToa is a powerful C# library designed to simplify trigonometric calculations, making it an essential tool for engineering, educational software, and any application dealing with geometric data. With its focus on ease of use and precision, SohCahToa helps developers perform complex trigonometric calculations with minimal effort.

Features

  • High Precision Calculations: Utilize double precision (Trig) or single precision (TrigF) for trigonometric operations.
  • Static Methods: Direct access to trigonometric calculations without needing to instantiate classes.
  • Comprehensive Coverage: Methods for calculating side lengths, primary and complimentary angles in right triangles.
  • Ease of Use: Intuitive method naming convention for quick understanding and implementation.

Installation

To integrate SohCahToa into your project, use the following NuGet command:

Install-Package SohCahToa

Quick Start

Calculate the length of the opposite side of a right triangle given the adjacent side and the angle:

double run = 5;
double primaryAngle = 30;
double rise = Trig.Rise_RunPrimaryAngle(run, primaryAngle);
Console.WriteLine($"Rise: {rise}");

API Overview

Trig Class

  • Double Precision: For applications requiring high accuracy.
  • Methods include Rise_RunPrimaryAngle, PrimaryAngle_RiseRun, ComplimentaryAngle_PrimaryAngle, etc.

TrigF Class

  • Single Precision: Optimized for performance and memory efficiency.
  • Methods mirror those of Trig but use float types, e.g., Rise_RunPrimaryAngle(float run, float primaryAngle).

Method Naming Convention

  • Descriptive Prefix: The primary output or focus of the method (e.g., Rise, Run, PrimaryAngle).
  • Underscore Separator: Enhances readability and method parsing.
  • Input Parameters: Inputs or known quantities used for calculation.

Examples

Calculate Side Lengths

double run = 5;
double primaryAngle = 30;
double rise = Trig.Rise_RunPrimaryAngle(run, primaryAngle);

Calculate Angles

double rise = 3;
double run = 4;
double primaryAngle = Trig.PrimaryAngle_RiseRun(rise, run);

Comprehensive Calculations

double run = 5;
double primaryAngle = 30;
double rise = Trig.Rise_RunPrimaryAngle(run, primaryAngle);
double complimentaryAngle = Trig.ComplimentaryAngle_PrimaryAngle(primaryAngle);

Contributing

Contributions are welcome! Please submit pull requests or open issues to discuss proposed changes or report bugs.

License

SohCahToa is released under the MIT License. See the LICENSE file in the repository for more details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.1 417 7/12/2024
2.1.0 191 7/11/2024
2.0.1 97 7/10/2024
2.0.0 107 7/10/2024
1.0.1 488 4/23/2023