Skip to content
Odds handing for Elixir
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.formatter.exs
.gitignore
LICENSE
README.md
mix.exs
mix.lock

README.md

Exoddic

Simple odds conversion (and, perhaps, future additional handling)

Currently supports the following formats:

  • :prob implied probability
  • :us US-style moneyline odds
  • :uk UK-style traditional odds
  • :eu Euro-style decimal odds
  • :id Indonesian-style odds
  • :my Malaysian-style odds
  • :hk Hong Kong-style odds
  • :roi Return on investment

Example usage

Exoddic.convert(0.50, from: :prob, to: :us, for_display: true) # "+100"
Exoddic.convert("2/1", from: :uk, to: :eu, for_display: true)  # "3.000"
Exoddic.convert(4.0, from: :eu, to: :prob, for_display: false) # 0.25
You can’t perform that action at this time.