Coordinate3D

data class Coordinate3D(x: Int, y: Int, z: Int) : Coordinate

Coordinate on a 3D board representing the x,y,z offset from the bottom left corner of the board

Constructors

Coordinate3D
Link copied to clipboard
fun Coordinate3D(x: Int, y: Int, z: Int)

Functions

component1
Link copied to clipboard
operator fun component1(): Int
component2
Link copied to clipboard
operator fun component2(): Int
component3
Link copied to clipboard
operator fun component3(): Int
copy
Link copied to clipboard
fun copy(x: Int, y: Int, z: Int): Coordinate3D
div
Link copied to clipboard
operator fun div(denom: Int): Coordinate3D
Returns the current coordinate divided by a given denominator, which is achieved by dividing (integer division) each component of the current coordinate by the given denominator
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
plus
Link copied to clipboard
operator fun plus(other: Coordinate3D): Coordinate3D
Returns the sum of the current coordinate and a given coordinate, which is achieved by element-wise addition
toString
Link copied to clipboard
open override fun toString(): String

Properties

x
Link copied to clipboard
val x: Int
the x offset from the bottom left of the board
y
Link copied to clipboard
val y: Int
the y offset from the bottom left of the board
z
Link copied to clipboard
val z: Int
the z offset from the bottom left of the board