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

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

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun toFloatArray(): FloatArray

Returns an array of coordinates of this vector.

Link copied to clipboard
open override fun toList(): List<Float>

Returns a list of coordinates of this vector.

Link copied to clipboard
fun toVec2(): Vec2

Returns a 2D vector with x and y coordinates of this vector.

Link copied to clipboard
fun toVec3(): Vec3

Returns a 3D vector with x, y and z coordinates of this vector.

Properties

Link copied to clipboard
val a: Float

Alpha channel of RGBA color.

Link copied to clipboard
val b: Float

Blue channel of RGBA color.

Link copied to clipboard
val g: Float

Green channel of RGBA color.

Link copied to clipboard
val r: Float

Red channel of RGBA color.

Link copied to clipboard
val w: Float
Link copied to clipboard
val x: Float
Link copied to clipboard
val y: Float
Link copied to clipboard
val z: Float