mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-10-06 16:37:08 +08:00
all: use Go 1.21's min/max builtin functions
This commit is contained in:
@@ -96,20 +96,6 @@ func (w *World) Draw(pix []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
func max(a, b int) int {
|
||||
if a < b {
|
||||
return b
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func min(a, b int) int {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// neighbourCount calculates the Moore neighborhood of (x, y).
|
||||
func neighbourCount(a []bool, width, height, x, y int) int {
|
||||
c := 0
|
||||
|
Reference in New Issue
Block a user