class OVOV::Calculator::Sprint
Constants
- IMPOSSIBLE_PERFORMANCE
- POOR_PERFORMANCE
Public Instance Methods
calculate()
click to toggle source
# File lib/calculator/disciplines/sprint.rb, line 7 def calculate return 0 if @performance > POOR_PERFORMANCE || @performance < IMPOSSIBLE_PERFORMANCE if @performance > 10.99 @points = ((14.3 - @performance) / 0.1) * 10 else @points = ((12.65 - @performance) / 0.05) * 10 end @points end