mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/atlas: refactoring
This commit is contained in:
parent
31945563d8
commit
d0556af8a4
@ -804,8 +804,7 @@ func adjustDestinationPixel(x float32) float32 {
|
|||||||
// float32(math.Floor((float64(x)+1.0/6.0)*3) / 3)
|
// float32(math.Floor((float64(x)+1.0/6.0)*3) / 3)
|
||||||
//
|
//
|
||||||
// The actual implementation is more optimized than the above implementation.
|
// The actual implementation is more optimized than the above implementation.
|
||||||
var ix float32
|
ix := float32(int(x))
|
||||||
ix = float32(int(x))
|
|
||||||
if x < 0 && x != ix {
|
if x < 0 && x != ix {
|
||||||
ix -= 1
|
ix -= 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user