SohCahToa 2.1.1

dotnet add package SohCahToa --version 2.1.1                
NuGet\Install-Package SohCahToa -Version 2.1.1                
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.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SohCahToa --version 2.1.1                
#r "nuget: SohCahToa, 2.1.1"                
#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.1.1

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

SohCahToa

NuGet version (SohCahToa)

SohCahToa is a C# library designed to simplify trigonometric calculations with a focus on ease of use and precision.

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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.0

    • No dependencies.
  • .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 335 7/12/2024
2.1.0 165 7/11/2024
2.0.1 95 7/10/2024
2.0.0 105 7/10/2024
1.0.1 486 4/23/2023