Arrays
Jarrett Billingsley
kb3ctd2 at yahoo.com
Fri Mar 16 14:08:12 PDT 2007
"Patrick" <spam at spam.at> wrote in message
news:etevk0$1cu6$1 at digitalmars.com...
>A struct which only contains one array of floats:
> struct Vector {
> float[3] containingElements;
> }
> I may be too finicky but it really seems like codebloat to me. But if
> there arent any other solutions...
If it makes you feel any better, that won't change the size or behavior of
the vector at all. It'll still be 12 bytes and passed by value. But the
nice thing is that you can then add methods to the vector struct. :\
More information about the Digitalmars-d-learn
mailing list