Fix InsertRandomRange warnings.
I was using the wrong format string.
This commit is contained in:
parent
bcfd42970b
commit
d569e77fc9
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user