From 791299a12fe9cab39e0e83f79df4633195c21ba1 Mon Sep 17 00:00:00 2001 From: Koichi KAMICHI Date: Fri, 3 Mar 2006 07:21:39 +0000 Subject: [PATCH] Forced round to integer. --- engine/polygon.js | 8 ++++---- engine/polygons.js | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/engine/polygon.js b/engine/polygon.js index 32667db..526d0c4 100755 --- a/engine/polygon.js +++ b/engine/polygon.js @@ -2,15 +2,15 @@ function Polygon(number){ // method function push(x, y){ // void var temp = new Object(); - temp.x = x; - temp.y = y; + temp.x = Math.floor(x); + temp.y = Math.floor(y); this.array.push(temp); } Polygon.prototype.push = push; function set(index, x, y){ // void - this.array[index].x = x; - this.array[index].y = y; + this.array[index].x = Math.floor(x); + this.array[index].y = Math.floor(y); } Polygon.prototype.set = set; diff --git a/engine/polygons.js b/engine/polygons.js index 9f26955..38fe2b7 100755 --- a/engine/polygons.js +++ b/engine/polygons.js @@ -8,12 +8,13 @@ function Polygons(){ function generateSVG(){ // string var buffer = ""; buffer += "\n"; - buffer += "\n"; + buffer += "\n"; for(var i = 0; i < this.array.length; i++){ buffer += "\n"; } buffer += "\n"; -- 1.7.10.4