Skip to content

Instantly share code, notes, and snippets.

@smathy
Forked from clooth/gist:3439743
Created August 23, 2012 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smathy/3439778 to your computer and use it in GitHub Desktop.
Save smathy/3439778 to your computer and use it in GitHub Desktop.
class GridBounds
constructor: (bounds) ->
[ 'min', 'max' ].forEach (mm) =>
[ 'x', 'y' ].forEach (xy) =>
@[ mm + xy.toUpperCase() ] = Math[mm] bounds[0][xy], bounds[1][xy]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment