Trigonometry - A small package to calculate values in an right angled triangle

Overview

Trigonometry

A small package to calculate values in an right angled triangle.

The package currently contains five functions

/// Calculates the opposite leg
/// - Parameter angle: The angle opposite to the leg
/// - Parameter hypothenuse: The value of the hypothenuse
/// - Returns: The value of the opposite leg
static func opposite(angle: Angle<Self>, hypothenuse: Self) -> Self
/// Calculates the adjacent leg
/// - Parameter angle: The angle adjacent to the leg
/// - Parameter hypothenuse: The value of the hypothenuse
/// - Returns: The value of the adjacent leg
static func adjacent(angle: Angle<Self>, hypothenuse: Self) -> Self
/// Calculates a leg
/// - Parameter hypothenuse: The value of the hypothenuse
/// - Parameter otherLeg: The value of the other leg
/// - Returns: The value of the leg
static func leg(hypothenuse: Self, otherLeg: Self) -> Self
/// Calculates an angle
/// - Parameter opposite: The opposite leg of the angle to calculate
/// - Parameter hypothenuse: The value of the hypothenuse
/// - Returns: The calculated angle
static func angle(opposite: Self, hypothenuse: Self) -> Angle<Self>
/// Calculates an angle
/// - Parameter adjacent: The adjacent leg of the angle to calculate
/// - Parameter hypothenuse: The value of the hypothenuse
/// - Returns: The calculated angle
static func angle(adjacent: Self, hypothenuse: Self) -> Angle<Self>

Use this package in your project

  1. Add the following line to the dependencies in your Package.swift file:
.package(url: "https://github.com/kkla320/Trigonometry", from: "1.0.0"),
  1. Add Trigonometry as a dependency for your target:
.target(name: "MyTarget", dependencies: [
  "Trigonometry"
]),
You might also like...
A simple protocol package that does nothing

HasResult A simple protocol package that does nothing. The HasResult protocol has a simple result property and a ResultType associated type. This is m

A Swift package for encoding and decoding Swift Symbol Graph files.
A Swift package for encoding and decoding Swift Symbol Graph files.

SymbolKit The specification and reference model for the Symbol Graph File Format. A Symbol Graph models a module, also known in various programming la

Package that extends Combine with some useful APIs

CombineExpanded Package that extends Combine with some useful APIs. New API: then shareReplay Future.deferred then Wait for completion of self, then f

FlutterNativeDragAndDrop - A package that allows you to add native drag and drop support into your flutter app
FlutterNativeDragAndDrop - A package that allows you to add native drag and drop support into your flutter app

native_drag_n_drop A package that allows you to add native drag and drop support

An IPFS client/api Swift Package, with the ability to add and pin any data on iOS/iPadOS/macOS

An IPFS client/api Swift Package, with the ability to add and pin any data on iOS/iPadOS/macOS. Originally bundled with GraniteUI, pulled out for independant use by any party.

WebDomHandling - A Swift Package for handling JavaScript code between WebKit and Swift implemented by WebKit

WebDomHandling A Swift Package for handling JavaScript code between WebKit and S

SafeDecoder - a swift package that set defaults when Codable fails to decode a field

SafeDecoder is a swift package that set defaults when Codable fails to decode a field. SafeDecoder supports configurable default values, See SafeDecoder.Configuration.

This is a Swift Package bundling different Train APIs into one simple Swift interface.

This is a Swift Package bundling different Train APIs into one simple Swift interface.

A Swift package that provides convenient Lorem Ipsum text, images, colors and other placeholders for rapidly prototyping, building and testing your iOS applications.
A Swift package that provides convenient Lorem Ipsum text, images, colors and other placeholders for rapidly prototyping, building and testing your iOS applications.

Lorem Introducing Lorem, a placeholder generator library for iOS to help you rapidly prototype, build and test your iOS applications. By leveraging Sw

Releases(2.0.0)
Owner
null
An iOS app that leverages the device camera and AVKit to calculate brightness.

Libre Light Sensor Privacy Policy Libre Light Sensor An iOS app that leverages the device camera and AVKit to calculate brightness. This app requires

John Harrington 3 Dec 29, 2022
Are you sure the chemical compounds of your daily use are 100% safe? Use Chem-Aware, identify them right now!

View Project On Devpost: Built With: PubChem's REST API How To Install Chem Aware: Prerequiste: Latest Version of Xcode and Simulators installed The a

Jerry Zhang 5 Aug 23, 2022
Open-source implementation of Apple's Combine for processing values over time

CombineX 简体中文 Open-source implementation of Apple's Combine for processing values over time. Though CombineX have implemented all the Combine interfac

Luo Xiu 1 Dec 30, 2021
MQTagged provides a Tagged structure which helps differentiating between values of the same type.

MQTagged provides a Tagged structure which helps differentiating between values of the same type.

Miquido 2 Jun 29, 2022
ExpoMod - a small application tool that lets you quickly setting up your computer for presentations / exhibitions

ExpoMod is a small application tool that lets you quickly setting up your computer for presentations / exhibitions. Or simply having useful shortcut to not being distract and keep awake your computer.

Niemes 10 Jun 29, 2022
A macOS application for accessing the output of the SimpleAnalytics package on the desktop.

The SimpleAnalytics package allows you to collect data user interaction analytic data in iOS and macOS applications. This SimpleAnalytics Reader app project allows you to more easily make sense of that collected data by displaying it on your Mac.

Dennis Birch 10 Dec 22, 2022
Flutter package for detecting NSFW images and videos using native implementation

Flutter NSFW 1- Download, tflite modle and put it in assets folder 2 - Add the path of the tfliet to pubspec.yaml 3 - Read the file using path_provide

Syed Ahsan Ali 8 Oct 16, 2022
React Native package for interacting with HomeKit devices

React Native package for interacting with HomeKit devices

Ibrahim Berat Kaya 4 Dec 24, 2021
This repository hosts the PushwooshGeozones iOS SDK as an XCFramework based Swift Package.

This repository hosts the PushwooshGeozones iOS SDK as an XCFramework based Swift Package. Use this repository's Swift Package in Xcode 12+

Pushwoosh 2 Nov 23, 2021
A corresponding package to RxKotlin Plus, but for Swift and iOS

A corresponding package to RxKotlin Plus, but for Swift and iOS

Lightning Kite 0 Dec 15, 2021