Skip to content

Instantly share code, notes, and snippets.

@oliverbenns
Created May 12, 2017 06:51
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 oliverbenns/80c81bf4303114f61782239ee63d1b08 to your computer and use it in GitHub Desktop.
Save oliverbenns/80c81bf4303114f61782239ee63d1b08 to your computer and use it in GitHub Desktop.
Horizontal + vertical square counter
const countHoriz = 24;
// 16, 24
const width = 960;
const height = 600;
const squareSize = width / countHoriz;
const countVert = height / squareSize
console.log("VERTICAL COUNT:", countHoriz);
console.log("HORIZONTAL COUNT", countVert);
console.log("SQUARE SIZE", squareSize);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment