[][src]Module mathlib::trig

trig

The trig module provides primitives and methods for trigonometric operations. Most importantly, the trig module provides two types: DegreeAngle and RadianAngle which can be used for most trigonometric operations

Type coercions

Always remember that RHS is preferred over LHS. Let's take a look at a couple of cases:

  • DegreeAngle<T> + RadianAngle<T> = RadianAngle<T>
  • RadianAngle<T> + DegreeAngle<T> = DegreeAngle<T>

Structs

DegreeAngle

An angle in degrees

RadianAngle

An angle in radians

Constants

PI32

Archimedes' constant (π)

PI64

Archimedes' constant (π)

Traits

IntoDeg

All objects implementing the IntoDeg trait can be converted into degrees

IntoRad

All objects implementing the IntoRad trait can be converted into radians