Skip to content

Instantly share code, notes, and snippets.

@radzionc
Created September 10, 2017 10:50
Show Gist options
  • Save radzionc/42840a63c36a2d7d203f048f74a5a1e4 to your computer and use it in GitHub Desktop.
Save radzionc/42840a63c36a2d7d203f048f74a5a1e4 to your computer and use it in GitHub Desktop.
...
add ({ x, y }) {
return Vector2D(this.x + x, this.y + y)
},
subtract ({ x, y }) {
return Vector2D(this.x - x, this.y - y)
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment