You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structVector(uint S, T) if (S >1)
{
T[S] data;
private@property
{
auto_get(uint U)() { return data[U]; }
void_set(uint U)(T value) { data[U] = value; }
}
alias _get!0 x;
alias _set!0 x;
alias _get!1 y;
alias _set!1 y;
}
voidmain()
{
auto vv = Vector!(2, float)();
vv.x = 32; // 'x' shows up twice in code-completion list
writeln(vv.y); // ditto for 'y'
}
It's a minor bug, and the example above isn't a realistic use-case-scenario, but gl3n makes use of "double aliases" for GLSL style vector property access (eg, vec1.xyz += vec2.yzz;) and I'm using them in some areas as well.
The text was updated successfully, but these errors were encountered:
It's a minor bug, and the example above isn't a realistic use-case-scenario, but gl3n makes use of "double aliases" for GLSL style vector property access (eg, vec1.xyz += vec2.yzz;) and I'm using them in some areas as well.
The text was updated successfully, but these errors were encountered: