vivid v0.4.2 Vivid.Math View Source

I made this because I was constantly importing a small selection of Erlang’s :math module, and then manually implementing degrees_to_radians/1 which got pretty annoying after a while.

Link to this section Summary

Functions

Delegates to :math.cos/1

Convert degrees into radians

Delegates to :math.pi/0

Delegates to :math.pow/2

Delegates to :math.sin/1

Delegates to :math.sqrt/1

Link to this section Functions

Link to this function degrees_to_radians(degrees) View Source
degrees_to_radians(number) :: float

Convert degrees into radians.

Examples:

iex> 180 |> Vivid.Math.degrees_to_radians
:math.pi