openrndr / org.openrndr.math / Vector4

Vector4

data class Vector4 : Serializable (source)

Double precision vector 4

Constructors

<init>

Vector4(x: Double)

Double precision vector 4

Vector4(x: Double, y: Double, z: Double, w: Double)

Properties

div

val div: Vector3

length

val length: Double

normalized

val normalized: Vector4

squaredLength

val squaredLength: Double

w

val w: Double

x

val x: Double

xy

val xy: Vector2

xyz

val xyz: Vector3

xz

val xz: Vector2

y

val y: Double

yx

val yx: Vector2

yz

val yz: Vector2

z

val z: Double

zx

val zx: Vector2

zy

val zy: Vector2

Functions

distanceTo

fun distanceTo(o: Vector4): Double

div

operator fun div(v: Vector4): Vector4
operator fun div(s: Double): Vector4

get

operator fun get(i: Int): Double

invoke

operator fun invoke(x: Double = this.x, y: Double = this.y, z: Double = this.z, w: Double = this.w): Vector4

minus

operator fun minus(v: Vector4): Vector4
operator fun minus(d: Double): Vector4

mix

fun mix(o: Vector4, mix: Double): Vector4

plus

operator fun plus(v: Vector4): Vector4
operator fun plus(d: Double): Vector4

squaredDistanceTo

fun squaredDistanceTo(o: Vector4): Double

times

operator fun times(v: Vector4): Vector4
operator fun times(s: Double): Vector4

toDoubleArray

fun toDoubleArray(): DoubleArray

unaryMinus

operator fun unaryMinus(): Vector4

Companion Object Properties

ONE

val ONE: Vector4

UNIT_W

val UNIT_W: Vector4

UNIT_X

val UNIT_X: Vector4

UNIT_Y

val UNIT_Y: Vector4

UNIT_Z

val UNIT_Z: Vector4

ZERO

val ZERO: Vector4

Extension Functions

clamp

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

map

fun Vector4.map(beforeLeft: Vector4, beforeRight: Vector4, afterLeft: Vector4, afterRight: Vector4, clamp: Boolean = false): Vector4

mod

fun Vector4.mod(b: Vector4): Vector4

saturate

fun Vector4.saturate(): Vector4

smoothstep

fun Vector4.smoothstep(edge0: Vector4, edge1: Vector4): Vector4