Properties

Link copied to clipboard
abstract val length: Double

length in Euclidean space

Link copied to clipboard
open val normalized: T

normalized vector

Link copied to clipboard
abstract val squaredLength: Double

squared length in Euclidean space

Link copied to clipboard
abstract val zero: T

returns the zero vector

Functions

Link copied to clipboard
open fun areaBetween(other: T): Double

returns the area of the parallelogram formed by extruding this over other

Link copied to clipboard
open fun atan2(other: T): Double

atan2 style angle between this and other

Link copied to clipboard
abstract fun distanceTo(other: T): Double

distance to other in Euclidean space

Link copied to clipboard
abstract operator fun div(scale: Double): T

Divides the current object by the given scale factor.

Link copied to clipboard
abstract infix fun dot(right: T): Double

dot product between this and right

Link copied to clipboard
abstract fun map(function: (Double) -> Double): T

Applies a given function to each component of the vector and returns a new vector with the transformed components.

Link copied to clipboard
abstract operator fun minus(right: T): T

Subtracts the specified value from the current value.

Link copied to clipboard
abstract operator fun plus(right: T): T

Adds the given value right to this value and returns the result.

Link copied to clipboard
open infix fun projectedOn(on: T): T

project this vector on on

Link copied to clipboard
open infix fun reflectedOver(surfaceNormal: T): T

reflect this vector over surfaceNormal

Link copied to clipboard
abstract fun squaredDistanceTo(other: T): Double

squared distance to other in Euclidean space

Link copied to clipboard
abstract operator fun times(scale: Double): T

Multiplies the current instance by the specified scalar value.