From 22effc184fba0b4df713bacaeaec94f14fd2e169 Mon Sep 17 00:00:00 2001 From: Koichi KAMICHI Date: Tue, 31 Jan 2006 07:38:23 +0000 Subject: [PATCH] Fixed var names. --- engine/polygon.js | 22 +++++++++++----------- engine/polygons.js | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/engine/polygon.js b/engine/polygon.js index b64edc7..32667db 100755 --- a/engine/polygon.js +++ b/engine/polygon.js @@ -1,16 +1,16 @@ -function Polygon(_index){ +function Polygon(number){ // method - function push(_x, _y){ // void + function push(x, y){ // void var temp = new Object(); - temp.x = _x; - temp.y = _y; + temp.x = x; + temp.y = 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; + function set(index, x, y){ // void + this.array[index].x = x; + this.array[index].y = y; } Polygon.prototype.set = set; @@ -19,8 +19,8 @@ function Polygon(_index){ } Polygon.prototype.reverse = reverse; - function concat(_poly){ // void - this.array = this.array.concat(_poly.array); + function concat(poly){ // void + this.array = this.array.concat(poly.array); } Polygon.prototype.concat = concat; @@ -28,8 +28,8 @@ function Polygon(_index){ this.array = new Array(); // initialize - if(_index){ - for(var i = 0; i < _index; i++){ + if(number){ + for(var i = 0; i < number; i++){ this.push(0, 0); } } diff --git a/engine/polygons.js b/engine/polygons.js index ae53bc0..9f26955 100755 --- a/engine/polygons.js +++ b/engine/polygons.js @@ -1,7 +1,7 @@ function Polygons(){ // method - function push(_polygon){ // void - this.array.push(_polygon); + function push(polygon){ // void + this.array.push(polygon); } Polygons.prototype.push = push; -- 1.7.10.4