tida.angle

Module for working with mathematical angles. Contains the translation of measurement systems, work in the form of determining the angle, vector rotation and more.

Members

Aliases

degToRad
alias degToRad = conv!(Degrees, Radians)

Converts degrees to radians.

from
alias from = conv
Undocumented in source.
perigon
alias perigon = max
Undocumented in source.
radToDeg
alias radToDeg = conv!(Radians, Degrees)

Convert radians to degrees.

Functions

betweenAngle
float betweenAngle(float a, float b)

Finds the angle between two angel's. Accepted in any angle change systems.

conv
float conv(float value)

Translate one system of angles into another.

minimize
float minimize(float angle)

Brings the angle back to normal.

pointDirection
T pointDirection(Vector!T a, Vector!T b)

Returns the angle between two vectors in radians.

rotate
Vecf rotate(Vecf vec, float angle, Vecf center)

Rotates the point by the specified number of degrees.

vectorDirection
Vector!T vectorDirection(T angle)

Convert angle to direction vector. Use when moving an object at a given angle.

Manifest constants

Degrees
enum Degrees;

Degrees

Gons
enum Gons;

Gons

Radians
enum Radians;

Radians

Turns
enum Turns;

Turns

Templates

max
template max(ubyte Type)

Maximum angle value.

rightAngle
template rightAngle(ubyte Type)

Returns the right angle.

straight
template straight(ubyte Type)

Returns straight angle.

Meta

Authors

License