win rate, 2020 bug
This commit is contained in:
@@ -127,6 +127,10 @@ final class StatsWithMostRecentDailyRecord: Content {
|
||||
var totalLosses:Int
|
||||
var mostRecentRecord:String
|
||||
|
||||
|
||||
var winRate:String {
|
||||
return "\((Double((Double(totalWins)/Double(totalWins + totalLosses))) * 100.0).truncate(places: 1))%"
|
||||
}
|
||||
init( winLoss:String, totalWins:Int, totalLosses:Int, mostRecentRecord:String ) {
|
||||
self.winLossRatio = winLoss
|
||||
self.totalWins = totalWins
|
||||
|
||||
Reference in New Issue
Block a user