Vec4

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

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

toFloatArray
Link copied to clipboard
common
open override fun toFloatArray(): FloatArray
Returns an array of coordinates of this vector.
toList
Link copied to clipboard
common
open override fun toList(): List<Float>
Returns a list of coordinates of this vector.
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