Vec4

data class Vec4(x: Float, y: Float, z: Float, w: Float)

4D vector with coordinates (x, y, z, w).

Can be used to specify RGBA color values.

Constructors

Vec4
Link copied to clipboard
common
fun Vec4(x: Float, y: Float, z: Float, w: Float)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

component1
Link copied to clipboard
common
operator fun component1(): Float
component2
Link copied to clipboard
common
operator fun component2(): Float
component3
Link copied to clipboard
common
operator fun component3(): Float
component4
Link copied to clipboard
common
operator fun component4(): Float
copy
Link copied to clipboard
common
fun copy(x: Float, y: Float, z: Float, w: Float): Vec4
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toFloatArray
Link copied to clipboard
common
fun toFloatArray(): FloatArray
Returns an array of coordinates of this vector.
toList
Link copied to clipboard
common
fun toList(): List<Float>
Returns a list of coordinates of this vector.
toString
Link copied to clipboard
common
open override fun toString(): String
toVec2
Link copied to clipboard
common
fun toVec2(): Vec2
Returns a 2D vector with x and y coordinates of this vector.
toVec3
Link copied to clipboard
common
fun toVec3(): Vec3
Returns a 3D vector with x, y and z coordinates of this vector.

Properties

a
Link copied to clipboard
common
val a: Float
Alpha channel of RGBA color.
b
Link copied to clipboard
common
val b: Float
Blue channel of RGBA color.
g
Link copied to clipboard
common
val g: Float
Green channel of RGBA color.
r
Link copied to clipboard
common
val r: Float
Red channel of RGBA color.
w
Link copied to clipboard
common
val w: Float
x
Link copied to clipboard
common
val x: Float
y
Link copied to clipboard
common
val y: Float
z
Link copied to clipboard
common
val z: Float