Skip to content

Instantly share code, notes, and snippets.

@Pan-Maciek
Created November 30, 2019 18:35
Show Gist options
  • Save Pan-Maciek/fd47028d9ce1711136f4e30f17ef4131 to your computer and use it in GitHub Desktop.
Save Pan-Maciek/fd47028d9ce1711136f4e30f17ef4131 to your computer and use it in GitHub Desktop.
class Point extends Array {
get x() { return this[0] }
set x(val) { this[0] = val }
get y() { return this[1] }
set y(val) { this[1] = val }
get z() { return this[2] }
set z(val) { this[2] = val }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment