Elex.Percent (Elex v0.4.0)

View Source

A percent stored as percent points.

50% is %Elex.Percent{value: Decimal.new("50")}. Callers build the struct directly.

Fields

  • :value - The percent points as a Decimal.t()

Examples

%Elex.Percent{value: Decimal.new("50")}
%Elex.Percent{value: Decimal.new("-10")}

Summary

Types

t()

A percent with decimal percent points.

Types

t()

@type t() :: %Elex.Percent{value: Decimal.t()}

A percent with decimal percent points.