# Vector3

@Serializable
data class Vector3(    val x: Double,     val y: Double,     val z: Double) : LinearType<Vector3> , EuclideanVector<Vector3>

Double-precision 3D vector.

## Constructors

fun Vector3(x: Double)
fun Vector3(    x: Double,     y: Double,     z: Double)

object Companion

## Functions

open fun areaBetween(other: Vector3): Double

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

open fun atan2(other: Vector3): Double

atan2 style angle between this and other

infix fun cross(v: Vector3): Vector3

Calculates a cross product between this Vector2 and v.

open override fun distanceTo(other: Vector3): Double

distance to other in Euclidean space

open operator override fun div(scale: Double): Vector3
operator fun div(v: Vector3): Vector3
open infix override fun dot(right: Vector3): Double

Calculates a dot product between this Vector2 and right.

operator fun get(i: Int): Double
open override fun map(function: (Double) -> Double): Vector3

apply function to all components

operator fun minus(d: Double): Vector3
open operator override fun minus(right: Vector3): Vector3
fun mix(o: Vector3, mix: Double): Vector3
operator fun plus(d: Double): Vector3
open operator override fun plus(right: Vector3): Vector3
open infix fun projectedOn(on: Vector3): Vector3

project this vector on on

open infix fun reflectedOver(surfaceNormal: Vector3): Vector3

reflect this vector over surfaceNormal

open override fun squaredDistanceTo(other: Vector3): Double

squared distance to other in Euclidean space

open operator override fun times(scale: Double): Vector3
operator fun times(v: Vector3): Vector3
fun toDoubleArray(): DoubleArray

Casts to DoubleArray.

fun toInt(): IntVector3

Casts to IntVector3.

operator fun unaryMinus(): Vector3

## Properties

open override val length: Double

The Euclidean length of the vector.

open val normalized: Vector3

normalized vector

val spherical: Spherical
open override val squaredLength: Double

The squared Euclidean length of the vector.

val x: Double
val xy: Vector2
val xyz0: Vector4
val xyz1: Vector4
val xz: Vector2
val y: Double
val yx: Vector2
val z: Double
open override val zero: Vector3

returns the zero vector

val zx: Vector2

## Extensions

fun Vector3.clamp(min: Vector3, max: Vector3): Vector3

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