Fix build errors.

This commit is contained in:
Kistaro Windrider 2023-11-18 18:05:04 -08:00
parent 2ebc2f904f
commit 91ebe9ddc3
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -1,6 +1,7 @@
package auctionsim
import (
"math"
"strconv"
)
@ -75,7 +76,7 @@ func Summarize(price float64, allBidders []Bidder) *ResultSummary {
rube = allBidders[maxIdx]
}
return &ResultSummary{
Bidders: len(allbidders),
Bidders: len(allBidders),
Price: price,
WinnerValue: winner.Value,
WinnerProfit: winner.Value - price,
@ -108,7 +109,7 @@ func ResultSummaryCSVHeader() []string {
}
func csvFloat(f float64) string {
return strconv.FormatFloat(f, 'g', CSVPrecision)
return strconv.FormatFloat(f, 'g', CSVPrecision, 64)
}
/**
@ -121,11 +122,11 @@ func (s *ResultSummary) CSVRecord() []string {
csvFloat(s.Price),
csvFloat(s.WinnerValue),
csvFloat(s.WinnerProfit),
strconv.Itoa(LosersWithRegrets),
strconv.Itoa(s.LosersWithRegrets),
csvFloat(s.HighestValue),
csvFloat(s.HighestValuatorBid),
csvFloat(s.MissedProfit),
csvFloat(s.ValueDelta),
strconv.Itoa(HighestValueRank),
strconv.Itoa(s.HighestValueRank),
}
}