Skip to content

Commit

Permalink
Build status and example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Koutanov committed Jan 18, 2024
1 parent d8103f1 commit 21b2310
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
`overround-methods`
===
A collection of overround application methods.
[![Build Status](https://img.shields.io/github/actions/workflow/status/kindredgroup/overround-methods/master.yml?branch=master&style=flat-square&logo=github)](https://github.com/kindredgroup/overround-methods/actions/workflows/dotnet.yml)

A collection of overround application methods.

# Examples
```csharp
using Overround;

double[] fairPrices = [1 / 0.1, 1 / 0.2, 1 / 0.3, 1 / 0.4];
double fairBooksum = Booksum.FromPrices(fairPrices);
Console.WriteLine("fair prices: [{0}]", string.Join(", ", fairPrices));
Console.WriteLine("fair booksum: {0}", fairBooksum);

double idealOverround = 1.15;
Console.WriteLine("ideal overround: {0}", idealOverround);

IOverroundMethod[] methods = [new Multiplicative(), new Additive(), new Power(), new OddsRatio()];
foreach (var method in methods)
{
double[] odds = method.Apply(fairPrices, idealOverround);
Console.WriteLine("");
Console.WriteLine("method: {0}", method.GetType().Name);
Console.WriteLine("odds: [{0}]", string.Join(", ", odds));
}
```

0 comments on commit 21b2310

Please sign in to comment.