15 lines
243 B
Plaintext
15 lines
243 B
Plaintext
#import "modules/std.sx";
|
|
|
|
Vec2 :: union {
|
|
data: [2]f32;
|
|
struct { x, y: f32; };
|
|
}
|
|
|
|
main :: () {
|
|
uv : Vec2 = ---;
|
|
uv.x = 1.0;
|
|
uv.y = 2.0;
|
|
print("promoted-x: {}\n", uv.x);
|
|
print("promoted-data0: {}\n", uv.data[0]);
|
|
}
|