IntVector3

data class IntVector3(x: Int, y: Int, z: Int)

Integer 3D vector, exclusively for integer calculations.

Constructors

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

Types

Companion
Link copied to clipboard
object Companion

Functions

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

Calculates a dot product between this Vector3 and right.

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

Properties

length
Link copied to clipboard
val length: Double

The Euclidean length of the vector.

squaredLength
Link copied to clipboard
val squaredLength: Int

The squared Euclidean length of the vector.

vector3
Link copied to clipboard
val vector3: Vector3

Casts to Vector3.

x
Link copied to clipboard
val x: Int
xx
Link copied to clipboard
val xx: IntVector2
xy
Link copied to clipboard
val xy: IntVector2
y
Link copied to clipboard
val y: Int
yx
Link copied to clipboard
val yx: IntVector2
yy
Link copied to clipboard
val yy: IntVector2
z
Link copied to clipboard
val z: Int

Extensions

clamp
Link copied to clipboard
fun IntVector3.clamp(min: IntVector3, max: IntVector3): IntVector3

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

mod
Link copied to clipboard
fun IntVector3.mod(b: IntVector3): IntVector3