On 19-apr-10, at 01:11, Gareth Charnock wrote:
Andrei Alexandrescu wrote:
On 04/16/2010 04:25 PM, Gareth Charnock wrote:
Okay, here goes. I've collected together the basic functionality
that
Quaternions:
opAdd, opSub, opMult(quaternion), opMult(vector), opDiv, Normalise,
Normalized, conjugate, conjugated, toEulerAngles*, fromEulerAngles,
this(real,i,j,k), this(angle,axis), getAngle(), getAxis()
Sounds good, but you'd need to convert the code to the new
overloaded operators approach.
Fair enough, and this will be a good opportunity to show off why the
new overloading scheme is more powerful (e.g. opAdd and opSub can be
combined).
About the overloading of opIndex still think that having just an
opIndexLhs might have been a little bit cleaner (you basically pick up
all overloading of the underlying type without any extra code), but as
overloading has become extremely easy it is not a big issue.