Difference between revisions of "vec2"

(Added a description and a link to Shader)
(Other Languages)
 
Line 18: Line 18:
 
{{#set:Description=Vector made of 2 floats.}}
 
{{#set:Description=Vector made of 2 floats.}}
 
== Other Languages ==
 
== Other Languages ==
{{i18n|vec4}}
+
{{i18n|vec2}}

Latest revision as of 21:56, 8 January 2023

A vector with 2 floating-point number components. These can be accessed with .r/g, .x/y, or [0/1].

vec2 example = vec2(0.5, 1.0);

float x = example.x;
float y = example.y;

Read more:

See Also

Other Languages