struct CrShader::Language::Types::Vec4

Overview

4-component single-precision floating-point vector (vec4).

Defined in:

crshader/language/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(x : Float32 = 0.0_f32, y : Float32 = 0.0_f32, z : Float32 = 0.0_f32, w : Float32 = 1.0_f32) #

def self.new(x : Number, y : Number, z : Number, w : Number = 1.0) #

def self.new(v3 : Vec3, w : Float32 = 1.0_f32) #

Instance Method Detail

def *(other : Vec4 | Float32) : Vec4 #

def +(other : Vec4) : Vec4 #

def -(other : Vec4) : Vec4 #

def - : Vec4 #

def /(other : Vec4 | Float32) : Vec4 #

def a : Float32 #

def b : Float32 #

def g : Float32 #

def r : Float32 #

Component swizzles


def rgb : Vec3 #

def rgba : Vec4 #

def w : Float32 #

def w=(w : Float32) #

def x : Float32 #

def x=(x : Float32) #

def xy : Vec2 #

def xyz : Vec3 #

def y : Float32 #

def y=(y : Float32) #

def z : Float32 #

def z=(z : Float32) #

def zw : Vec2 #