1
0
Fork 0
mirror of https://github.com/Luzifer/aoc2019.git synced 2024-12-22 14:01:17 +00:00
aoc2019/helpers.go

8 lines
148 B
Go
Raw Normal View History

package aoc2019
import "math"
func manhattenDistance(x1, y1, x2, y2 int) int {
return int(math.Abs(float64(x1-x2)) + math.Abs(float64(y1-y2)))
}