From 0b09c1689486300c4302a4218d6607cd4a930e4d Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Sun, 16 Dec 2012 20:02:26 -0500 Subject: [PATCH] style fixes --- 1d.js | 4 ++-- index.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/1d.js b/1d.js index ed76608..5ead70f 100644 --- a/1d.js +++ b/1d.js @@ -17,8 +17,8 @@ $(document).ready(function(){ var canvas = document.getElementById('1d-automaton') var c = canvas.getContext('2d'); - var cellWidth = canvas.width / cells; - var cellHeight = canvas.height / generations; + var cellWidth = Math.floor(canvas.width / cells); + var cellHeight = Math.floor(canvas.height / generations); var generation = 0; function cell(x, y, h, l) { diff --git a/index.php b/index.php index b9169d5..959899f 100644 --- a/index.php +++ b/index.php @@ -11,7 +11,8 @@

2D

- Generation: 0 + Generation 0 +
2500 cells

Start automaton -- 2.30.2