internal representation of struct
Trass3r
un at known.com
Sat Mar 19 07:15:51 PDT 2011
Am 18.03.2011, 18:33 Uhr, schrieb Daniel Gibson <metalcaedes at gmail.com>:
> Why not do something like:
> struct vec3f {
> float[3] xyz;
> @property float x() { return xyz[0]; } // read x
> @property float x(float val) { return xyz[0] = val; } // write x
> // and the same for y and z ...
> // ... and your own functions
> }
You could also use unions to achieve that.
More information about the Digitalmars-d
mailing list