From: Koichi KAMICHI Date: Fri, 3 Mar 2006 07:21:39 +0000 (+0000) Subject: Forced round to integer. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=791299a12fe9cab39e0e83f79df4633195c21ba1;p=chise%2Fkage.git Forced round to integer. --- 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";