From: Dylan Lloyd Date: Mon, 17 Dec 2012 01:02:26 +0000 (-0500) Subject: style fixes X-Git-Url: https://disinclined.org/git/?a=commitdiff_plain;h=0b09c1689486300c4302a4218d6607cd4a930e4d;p=cellular-automaton.git style fixes --- 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