This commit is contained in:
@@ -67,6 +67,7 @@ namespace BritishHorseRacingApi.Tests
|
||||
[Theory()]
|
||||
[InlineData("3/5", 1.6)]
|
||||
[InlineData("20/1",21)]
|
||||
[InlineData("5.5/1", 6.5)]
|
||||
[InlineData("", null)]
|
||||
[InlineData(" ", null)]
|
||||
[InlineData(null, null)]
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BritishHorseRacingApi.Helpers
|
||||
var lossDifference = GetComponent(match, "lossDifference", 0d);
|
||||
return (int)TimeSpan.FromSeconds(lossDifference).TotalMilliseconds;
|
||||
}
|
||||
private static Regex _ratioRegex = new Regex("(?'Numerator'[0-9]+)/(?'Denominator'[0-9]+)", RegexOptions.Compiled);
|
||||
private static Regex _ratioRegex = new Regex("(?'Numerator'[0-9.]+)/(?'Denominator'[0-9.]+)", RegexOptions.Compiled);
|
||||
public static decimal? FractionOddsToDecimal(string fraction)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(fraction))
|
||||
|
||||
Reference in New Issue
Block a user