1 function Polygon(number){
\r
5 function push(x, y){ // void
\r
6 var temp = new Object();
\r
7 temp.x = Math.floor(x*10)/10;
\r
8 temp.y = Math.floor(y*10)/10;
\r
9 this.array.push(temp);
\r
11 Polygon.prototype.push = push;
\r
13 function set(index, x, y){ // void
\r
14 this.array[index].x = Math.floor(x*10)/10;
\r
15 this.array[index].y = Math.floor(y*10)/10;
\r
17 Polygon.prototype.set = set;
\r
19 function reverse(){ // void
\r
20 this.array.reverse();
\r
22 Polygon.prototype.reverse = reverse;
\r
24 function concat(poly){ // void
\r
25 this.array = this.array.concat(poly.array);
\r
27 Polygon.prototype.concat = concat;
\r
29 function shift(){ // void
\r
32 Polygon.prototype.shift = shift;
\r
34 function unshift(x, y){ // void
\r
35 var temp = new Object();
\r
36 temp.x = Math.floor(x*10)/10;
\r
37 temp.y = Math.floor(y*10)/10;
\r
38 this.array.unshift(temp);
\r
40 Polygon.prototype.unshift = unshift;
\r
43 this.array = new Array();
\r
47 for(var i = 0; i < number; i++){
\r