Skip to content

Instantly share code, notes, and snippets.

@robotlolita
Forked from hughfdjackson/gist:1918471
Created February 26, 2012 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robotlolita/1918482 to your computer and use it in GitHub Desktop.
Save robotlolita/1918482 to your computer and use it in GitHub Desktop.
void function(root){
var Point = boo.Base.derive({
init:
function(x, y) {
this.x = x
this.y = y
return this }
, fromPoint:
function(point) {
return this.make(point.x, point.y) }
, same_as:
function(point) {
return this.x === point.x
&& this.y === point.y }
, toString:
function() {
return '(' + this.x + ', ' + this.y + ')' }
})
}(this)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment