Update of "Mathematics.Angles (Package)"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: eedfc4fe5bf1e08f59c5e11118e1ef68f44479bd
Page Name:Mathematics.Angles (Package)
Date: 2017-03-11 05:18:16
Original User: Entomy
Parent: 7400a198a46bf8eef00f8e9677e6579c6b81f153
Content

Purpose

Angles, unlike most other numeric, are of an actual dimension. However even more so, they are unlike other dimensions in that they are constrained to a relatively small range. They also exhibit wrap-around (modular) behavior, but the exact range and modulus varies, and so this package exists to greatly simplify working with angles.

Types

Angle

This is a sized type allowing a tradeoff between memory use and precision. The exact implementation details are allowed to vary, but must accurately convert between Degrees, Gradians, Radians, and Turns. This type is almost always what you actually want to use.

Others

All other types are units of the angular dimension, and primarily exist as a means of specifying angles. Functions to construct angles, and functions to get the angle back in the specified unit, both exist. As well, math can be carried out purely in the unit, although this is not advised.

Quirks

The actual implementation of these types, as with all dimensions and units, has to be a packed record of only a single value. The compiler should easily recognize these as single values and not produce bloated code. This is done to hide problematic intrinsic, since multiplication and division of two angles does not result in another angle. For this reason, exponentiation will never be defined.