Created
October 10, 2008 13:49
-
-
Save samleb/16045 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Point(x, y) { | |
return { | |
getX: K(x), | |
getY: K(y), | |
getOriginDistance: function() { | |
return Math.sqrt(this.getX()**2 + this.getY()**2); | |
} | |
} | |
function Point(x, y) { | |
return { | |
getX: K(x), | |
getY: K(y), | |
getOriginDistance: function() { | |
return Math.sqrt(x**2 + y**2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment