mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphics: Use 0.0 instead of type conversion; gofmt
This commit is contained in:
parent
abc20ca160
commit
406edf28c2
@ -70,18 +70,18 @@ func vertices(sx0, sy0, sx1, sy1 int, width, height int, geo *affine.GeoM) []flo
|
|||||||
g.Concat(geo)
|
g.Concat(geo)
|
||||||
geo = &g
|
geo = &g
|
||||||
}
|
}
|
||||||
x0, y0 := float64(0), float64(0)
|
x0, y0 := 0.0, 0.0
|
||||||
x1, y1 := float64(sx1 - sx0), float64(sy1 - sy0)
|
x1, y1 := float64(sx1-sx0), float64(sy1-sy0)
|
||||||
|
|
||||||
// it really feels like we should be able to cache this computation
|
// it really feels like we should be able to cache this computation
|
||||||
// but it may not matter.
|
// but it may not matter.
|
||||||
w := 1
|
w := 1
|
||||||
h := 1
|
h := 1
|
||||||
for w < width {
|
for w < width {
|
||||||
w *= 2
|
w *= 2
|
||||||
}
|
}
|
||||||
for h < height {
|
for h < height {
|
||||||
h *= 2
|
h *= 2
|
||||||
}
|
}
|
||||||
wf := float32(w)
|
wf := float32(w)
|
||||||
hf := float32(h)
|
hf := float32(h)
|
||||||
|
Loading…
Reference in New Issue
Block a user