Created
September 13, 2017 17:53
-
-
Save duaneleem/a5b83bf19bd59953d83f357e8278173b to your computer and use it in GitHub Desktop.
Code Documentation
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
/** Class representing a point. */ | |
class Point { | |
/** | |
* Create a point. | |
* @param {number} x - The x value. | |
* @param {number} y - The y value. | |
*/ | |
constructor(x, y) { | |
// ... | |
} | |
/** | |
* Get the x value. | |
* @return {number} The x value. | |
*/ | |
getX() { | |
// ... | |
} | |
/** | |
* Get the y value. | |
* @return {number} The y value. | |
*/ | |
getY() { | |
// ... | |
} | |
/** | |
* Convert a string containing two comma-separated numbers into a point. | |
* @param {string} str - The string containing two comma-separated numbers. | |
* @return {Point} A Point object. | |
*/ | |
static fromString(str) { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment