blob: 40384babe17a12c4ce38ae96026738204ea54860 (
plain) (
tree)
|
|
defmodule Alcool do
@spec units(Float.t, Float.t) :: Float.t
def units(cl, degrees) do
kg(cl, degrees)*100
end
def grams(cl, degrees) do
kg(cl, degrees)*1000
end
def kg(cl, degrees) do
(((cl/100) * 0.8) * (degrees/100))
end
end
|