Fixed SVG header.
[chise/kage.git] / engine / polygon.js
index 32667db..c2e3907 100755 (executable)
@@ -2,15 +2,15 @@ function Polygon(number){
   // method\r
   function push(x, y){ // void\r
     var temp = new Object();\r
-    temp.x = x;\r
-    temp.y = y;\r
+    temp.x = Math.floor(x);\r
+    temp.y = Math.floor(y);\r
     this.array.push(temp);\r
   }\r
   Polygon.prototype.push = push;\r
   \r
   function set(index, x, y){ // void\r
-    this.array[index].x = x;\r
-    this.array[index].y = y;\r
+    this.array[index].x = Math.floor(x);\r
+    this.array[index].y = Math.floor(y);\r
   }\r
   Polygon.prototype.set = set;\r
   \r
@@ -23,7 +23,7 @@ function Polygon(number){
     this.array = this.array.concat(poly.array);\r
   }\r
   Polygon.prototype.concat = concat;\r
-  \r
+\r
   // property\r
   this.array = new Array();\r
   \r