Closed al1-ce closed 1 year ago
Unfortunately this would be a breaking change, as &v.x
would become a delegate.
I assume aliases would do something similar then Well, making my own wrapper anyway
Still, toArray and fromArray would be appreciated if not a burden to do
Such an implementation is trivial, if you want to include it for your external projects.
ref float[2] asArray(ref Vector2 v)
{
return *cast(float[2]*)&v;
}
v.asArray[0] = 5;
assert(v.x == 5);
Have vectors in this format:
To allow usage of other libraries/custom vector implementations