Skip to content

Instantly share code, notes, and snippets.

@VoloshchenkoAl
Created February 23, 2017 18:50
Show Gist options
  • Save VoloshchenkoAl/34d44e74119718b9b80134852695a28e to your computer and use it in GitHub Desktop.
Save VoloshchenkoAl/34d44e74119718b9b80134852695a28e to your computer and use it in GitHub Desktop.
var Line = (function () {
function Line(line) {
this.x = line.x;
this.y = line.y;
this.id = line.id;
}
Line.prototype.setX = function (x) {
this.x = x;
};
Line.prototype.setY = function (y) {
this.y = y;
};
Line.prototype.toString = function () {
return "L " + this.x + " " + this.y + " ";
};
return Line;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment