Skip to content

Instantly share code, notes, and snippets.

@clooth
Created August 23, 2012 18:10
Show Gist options
  • Save clooth/3439743 to your computer and use it in GitHub Desktop.
Save clooth/3439743 to your computer and use it in GitHub Desktop.
class GridBounds
constructor: (bounds) ->
this.minX = Math.min(bounds[0].x, bounds[1].x)
this.maxX = Math.max(bounds[0].x, bounds[1].x)
this.minY = Math.min(bounds[0].y, bounds[1].y)
this.maxY = Math.min(bounds[0].y, bounds[1].y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment