Faker Elixir (octopus) v1.0.2 FakerElixir.Number

Generate fake data for the domain Number

Summary

Functions

Return a number between the range given

Return a number between the min and max given

Return a random decimal number

Return a random decimal number with x left digits

Return a random decimal number with x left digits and x right digits

Return a digit

Return random digits

Return x digits

Functions

between(range)

Return a number between the range given

Examples

iex> FakerElixir.Number.between(15..150)
130
between(min, max)

Return a number between the min and max given

Examples

iex> FakerElixir.Number.between(15, 150)
18

iex> FakerElixir.Number.between(11.22, 13.88)
11.24

iex> FakerElixir.Number.between(12, 12.35)
12.11
decimal()

Return a random decimal number

Examples

iex> FakerElixir.Number.decimal
"70.8"
decimal(left_digits)

Return a random decimal number with x left digits

Examples

iex> FakerElixir.Number.decimal(3)
"918.43"
decimal(left_digits, right_digits)

Return a random decimal number with x left digits and x right digits

Examples

iex> FakerElixir.Number.decimal(1, 3)
"2.298"
digit()

Return a digit

Examples

iex> FakerElixir.Number.digit
3
digits()

Return random digits

Examples

iex> FakerElixir.Number.digits
452
digits(length)

Return x digits

Examples

iex> FakerElixir.Number.digits(4)
7025