Vector3

class Vector3(val x: Double, val y: Double, val z: Double)

Constructors

Link copied to clipboard
constructor(x: Double, y: Double, z: Double)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val x: Double
Link copied to clipboard
val y: Double
Link copied to clipboard
val z: Double

Functions

Link copied to clipboard
fun angle(other: Vector3): Double
Link copied to clipboard
Link copied to clipboard
fun cross(other: Vector3): Vector3
Link copied to clipboard
fun distance(other: Vector3): Double
Link copied to clipboard
operator fun div(scale: Double): Vector3
operator fun div(other: Vector3): Vector3
Link copied to clipboard
fun dot(other: Vector3): Double
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun length(): Double
Link copied to clipboard
operator fun minus(other: Vector3): Vector3
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Create a Vector of length 1 pointing in the same direction as this.

Link copied to clipboard
operator fun plus(other: Vector3): Vector3
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Rotates the vector about the origin. The rotation is anticlockwise if the y axis points downwards.

Link copied to clipboard
operator fun times(scale: Double): Vector3
operator fun times(other: Vector3): Vector3
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun towards(other: Vector3, distance: Double): Vector3
Link copied to clipboard
operator fun unaryMinus(): Vector3
Link copied to clipboard
fun unit(): Vector3