vivid v0.4.1 Vivid.Math

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.

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

Functions

cos(x)

Delegates to :math.cos/1.

degrees_to_radians(degrees)
degrees_to_radians(number) :: float

Convert degrees into radians.

Examples:

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

Delegates to :math.pi/0.

pow(x, y)

Delegates to :math.pow/2.

sin(x)

Delegates to :math.sin/1.

sqrt(x)

Delegates to :math.sqrt/1.