Fix InsertRandomRange warnings.

I was using the wrong format string.
This commit is contained in:
Kistaro Windrider 2023-04-01 14:39:56 -07:00
parent bcfd42970b
commit d569e77fc9
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -171,19 +171,19 @@ func (d *Deck[C]) InsertRandomRange(loFrac, hiFrac float64, card Card[C]) error
loFrac, hiFrac = hiFrac, loFrac
}
if loFrac < 0.0 {
errs.Add(Warningf("%w: loFrac was %d", WarningTopClamped, loFrac))
errs.Add(Warningf("%w: loFrac was %f", WarningTopClamped, loFrac))
loFrac = 0.0
}
if loFrac > 1.0 {
errs.Add(Warningf("%w: loFrac was %d", WarningBottomClamped, loFrac))
errs.Add(Warningf("%w: loFrac was %f", WarningBottomClamped, loFrac))
loFrac = 1.0
}
if hiFrac < 0.0 {
errs.Add(Warningf("%w: hiFrac was %d", WarningTopClamped, hiFrac))
errs.Add(Warningf("%w: hiFrac was %f", WarningTopClamped, hiFrac))
hiFrac = 0.0
}
if hiFrac > 1.0 {
errs.Add(Warningf("%w: hiFrac was %d", WarningBottomClamped, hiFrac))
errs.Add(Warningf("%w: hiFrac was %f", WarningBottomClamped, hiFrac))
hiFrac = 1.0
}