util-math / io.github.sof3.graphmine.util.math / IntVector3
inline class IntVector3
A 3-dimensional vector in integers. Intended to store aligned positions e.g. block positions.
The class is a value class. Values in this class cannot be changed. Therefore, no copy method is present.
| <init> | IntVector3(x: Int, y: Int, z: Int)Consrtucts a Vector3 by specifying all coordinates IntVector3(values: IntArray)A 3-dimensional vector in integers. Intended to store aligned positions e.g. block positions. |
| length | val length: DoubleCalculates the length (a.k.a. norm or modulus) of this vector. |
| lengthSquared | val lengthSquared: IntCalculates the squared length of this vector |
| unit | val unit: Vector3 |
| x | val x: IntThe x-component value |
| y | val y: IntThe y-component value, which is orthogonal to x |
| z | val z: IntThe z-component value, which is in the direction of x×y |
| abs | fun abs(): IntVector3 |
| cross | infix fun cross(v: IntVector3): IntVector3Calculates the cross product of this and v |
| distanceSquared | fun distanceSquared(that: IntVector3): IntCalculates the squared distance between this and that |
| distanceTo | infix fun distanceTo(that: IntVector3): DoubleCalculates the distance between this and that. |
| dot | infix fun dot(v: IntVector3): IntCalculates the dot product of this and v |
| eachSide | fun eachSide(fn: (IntVector3) -> Unit): Unit |
| minus | operator fun minus(that: IntVector3): IntVector3Calculates this - that |
| plus | operator fun plus(that: IntVector3): IntVector3Calculates this + that |
| rangeTo | operator fun rangeTo(that: IntVector3): IntVector3RangeReturns the minimum IntVector3Range that inclusively contains both this and that |
| side | fun side(side: Side): IntVector3fun side(side: Side, steps: Int): IntVector3 |
| times | operator fun times(scalar: Int): IntVector3Multiplies the components of this by scalar |
| toDouble | fun toDouble(): Vector3Converts to a Vector3 with approximately equivalent positions |
| unaryMinus | operator fun unaryMinus(): IntVector3 |
| unaryPlus | operator fun unaryPlus(): IntVector3 |
| UNIT_X | val UNIT_X: IntVector3A unit vector in the direction of x (east) |
| UNIT_X_NEG | val UNIT_X_NEG: IntVector3A unit vector in the direction of -x (west) |
| UNIT_Y | val UNIT_Y: IntVector3A unit vector in the direction of y (up) |
| UNIT_Y_NEG | val UNIT_Y_NEG: IntVector3A unit vector in the direction of -y (up) |
| UNIT_Z | val UNIT_Z: IntVector3A unit vector in the direction of z (south) |
| UNIT_Z_NEG | val UNIT_Z_NEG: IntVector3A unit vector in the direction of -z (north) |
| ZERO | val ZERO: IntVector3A zero vector |