
23 Sep
2006
23 Sep
'06
3:33 a.m.
Olivier Grant wrote:
Well due to the fact that floats are represented on 4 bytes, there shouldn't be any padding involved. Padding normally occures when certain member variables of a structure require certain alignment constraints or just for efficiency, but this shouldn't occur with a vector class (at least that is my understanding).
Why assume the type's will be floats ? There's a number of situations where doubles, fixed point or some lossless representation would be preferable, any solution that doesn't allow this isn't a serious vector library imo. Typedefs though should be provided for all the common cases (floats / doubles) for ease of use. cheers Martin