Metadata-Version: 2.4
Name: irating-ircalculator
Version: 0.0.1
Summary: Simple gain-lost irating calculator.
Author-email: Víctor Arnelas <arrecio@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/arrecio/ircalculator/
Project-URL: Issues, https://github.com/arrecio/ircalculator/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file


# ircalculator

Implements the iRating calculator formula used in https://github.com/SIMRacingApps/SIMRacingApps/files/3617438/iRacing.SOF.iRating.Calculator.v1_1.xlsx to estimate final ratings giving the results.

# Example
    from ircalculator.calculator import IRatingCalculator, IRatingResult
    
    # results of the race in order (final positions)
    results = [
            #             Name        ir    started
            IRatingResult("Driver 1", 8653, True),
            IRatingResult("Driver 2", 7356, True),
            IRatingResult("Driver 3", 8230, True),
            IRatingResult("Driver 4", 4398, True),
            IRatingResult("Driver 5", 3250, True),
            IRatingResult("Driver 6", 1782, True),
            IRatingResult("Driver 8", 8362, False),
            IRatingResult("Driver 9", 6729, False),
    ]
    
    newRatings = IRatingCalculator().calculate(results)
    print(newRatings, '\n', results)

