Skip to content

Instantly share code, notes, and snippets.

@weslien
Forked from jxson/README.md
Last active October 13, 2015 12:23
Show Gist options
  • Save weslien/3c27044bc200f128675f to your computer and use it in GitHub Desktop.
Save weslien/3c27044bc200f128675f to your computer and use it in GitHub Desktop.
README.md template

Odds calculator

Synopsis

Helper library for calculations related to odds.

Code Example

import com.company.odds.OddsCalculator;

...

float combinedOdds = OddsCalculator.combine(oddsA, oddsB, oddsC);
float basicOdds = OddsCalculator.basic(nrPossibleOutcomes, nrFavorableOutcomes);

...

Motivation

Collect all operations related to odds in one place to control how calculations are performed across the company

Installation

Gradle

dependencies {
    compile group: 'company', name: 'odds', version: '0.1.7'
}

Maven

<project>
  ...
  <dependencies>
    <dependency>
      <groupId>company</groupId>
      <artifactId>odds</artifactId>
      <version>0.1.7</version>
    </dependency>
  </dependencies>
</project>

API Reference

combine(float ... floats)

Takes an arbitrary list of odds and returns the combined odds

basic(float possible, float desirable)

Calculates the basic odds given possible and desirable number of outcomes

Tests

> gradle test

Contributors

Link to Jira accounts here

Do you want to contribute?

  • Fork this repository in Stash
  • Create a feature branch
  • Make your changes
  • Submit a pull request back to master branch and add at least 2 core contributors as reviewers

History

Changelog here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment