Skip to content

Commit

Permalink
portable max int
Browse files Browse the repository at this point in the history
  • Loading branch information
Ted Singer authored and Ted Singer committed Dec 8, 2019
1 parent 3cd8647 commit 73d9244
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion geometry.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package main
import "math/rand"
import "time"

const MaxInt int = 2147483648
const MaxUint = ^uint(0)
const MaxInt int = int(MaxUint >> 1)

func (from Window) distanceScore(to Window, xdir int, ydir int) int {
// If `to` is mostly in the correct direction, return the square distance between `from` and `to`
Expand Down

0 comments on commit 73d9244

Please sign in to comment.