angle v0.3.0 Angle.Sigil

This module defines the ~a macros. To use it just use Angle.

Link to this section Summary

Functions

Defines a ~a shortcut for inputting angles

Link to this section Functions

Link to this function sigil_a(value, arg2)
sigil_a(String.t(), list()) :: Angle.t()

Defines a ~a shortcut for inputting angles.

Examples

Creating an Angle from degrees:

iex> use Angle
...> ~a(13.2)d
#Angle<13.2°>

iex> use Angle
...> ~a(13)d
#Angle<13°>

Creating an Angle from radians:

iex> use Angle
...> ~a(0.25)r
#Angle<0.25>

iex> use Angle
...> ~a(13)r
#Angle<13>

An angle of zero is the same in both degrees and radians do doesn’t need a modifier

iex> use Angle
...> ~a(0)
#Angle<0>