Brenton:

1) I initialize the vector to a null vector, not nans

Why?


2) The dot and cross are "inout" methods, i.e. available for mutable, const, and immutable objects. There is no reason to declare "inout" methods as being "const".

But I suggest to add pure/nothrow.


3) The dot and cross methods take an input "in" argument. This allows the compiler to choose between passing the parameter by const value or const reference.

This is not true. In means "const scope", so it's always passed by value.

Bye,
bearophile

Reply via email to