IntVector2

@Serializable
data class IntVector2(val x: Int, val y: Int)(source)

Integer 2D vector, exclusively for integer calculations.

Constructors

Link copied to clipboard
constructor(x: Int, y: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The Euclidean length of the vector.

Link copied to clipboard

The squared Euclidean length of the vector.

Link copied to clipboard

Casts to Vector2.

Link copied to clipboard
val x: Int
Link copied to clipboard
Link copied to clipboard
val y: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns IntVector2 whose value is limited between min and max per vector component.

Link copied to clipboard
operator fun div(d: Int): IntVector2
Link copied to clipboard
infix fun dot(right: IntVector2): Int

Calculates a dot product between this Vector2 and right.

Link copied to clipboard
operator fun minus(v: IntVector2): IntVector2
Link copied to clipboard
Link copied to clipboard
operator fun plus(v: IntVector2): IntVector2
Link copied to clipboard
operator fun times(d: Int): IntVector2