EuclideanVector

interface EuclideanVector<T : EuclideanVector<T>, LinearType<T>> : LinearType<T>

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
Link copied to clipboard
abstract infix fun dot(right: T): Double

dot product between this and other

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

apply function to all components

Link copied to clipboard
abstract operator fun minus(right: T): T
Link copied to clipboard
abstract operator fun plus(right: T): T
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

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

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sources

Link copied to clipboard