Skip to content

IntCoordinates

@JvmInline
@Serializable



value class IntCoordinates(val pair: Long)

A 2D integer coordinate pair, packed into a single Long (x in the high 32 bits, y in the low 32 bits) to avoid boxing allocations. Also aliased as IntOffset when used to represent a relative displacement rather than an absolute position.

Constructors

IntCoordinates

constructor(pair: Long)
constructor(x: Int, y: Int)

Properties

pair

val pair: Long

x

val x: Int

y

val y: Int

Functions

component1

operator fun component1(): Int

component2

operator fun component2(): Int

minus

operator fun minus(other: IntCoordinates): IntCoordinates

plus

operator fun plus(other: IntCoordinates): IntCoordinates

toString

open override fun toString(): String