Provides an abstraction for mathematical angle.
Because the angle is a type, errors such as:
sum or subtract a degree angle with a radian angle
pass degree angle to a trigonometric function from standard library
are either not possible or catched at compile time.
Support convenience initializers, operators and functions for natural, fast and productive workflow.
Provides an abstraction for mathematical angle. Because the angle is a type, errors such as:
are either not possible or catched at compile time. Support convenience initializers, operators and functions for natural, fast and productive workflow.
Table of contents
Usage
Importing the module
You can import this module using:
Creation
Converting between Degree and Radian
From Degree to Radian:
From Radian to Degree:
Basic Operations
Addition
Subtraction
Multiplcation
Division
Normalization
Equality
Comparison
Foundation.Measurement conversion
Inverse trigonometric functions
Inverse functions are provided by using convenience constructors of Radian type.
Trigonometric functions
Constants
Frequently used Radian angles have constants:
Installation
Supported Operating Systems
1. Carthage
If you need the framework only for a single OS, then I propose to use
--platform [iOS|macOS|watchOS|tvOS]
specifier when your performcarthage update
.2. CocoaPods
Add the dependency in your
Podfile
.3. Swift Package Manager
Add the the following dependecy in your
Package.swift
:and update your target’s dependencies:
Contribution
Module is covered by unit tests, however, bugs always slip through. If you find a bug in the module create an issue.
If you want to contribute on fixing bugs or implementing new features then create a pull request.
License
DLAngle is released under MIT license. See LICENSE for details.