struct CrShader::Language::Types::Vec2

Overview

2-component single-precision floating-point vector (vec2).

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) #

def self.new(x : Number, y : Number) #

Instance Method Detail

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

def +(other : Vec2) : Vec2 #

def -(other : Vec2) : Vec2 #

def - : Vec2 #

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

def g : Float32 #

def r : Float32 #

Component swizzles


def s : Float32 #

def t : Float32 #

def x : Float32 #

def x=(x : Float32) #

def xx : Vec2 #

def xy : Vec2 #

def y : Float32 #

def y=(y : Float32) #

def yx : Vec2 #

def yy : Vec2 #