olegvasil
Эксперт
Дата регистрации:
25.03.2013 22:27:59
Сообщений: 106
function Point(x,y){
this.x = x;
this.y = y;
this.toString = tostring;
}
var point_1 = new Point(10,20);
var point_2 = new Point(50,60);
function Line(point_1,point_2){
this.point_1 = point_1;
this.point_2 = point_2;
this.range = range;
}
function tostring(){
return "(" + this.x + "," + this.y + ""
}
function range(){
return point_1 - point_2;
}
document.write(point_1 + " " + point_2);