3d vector struct
    bearophile 
    bearophileHUGS at lycos.com
       
    Mon Feb  3 12:20:49 PST 2014
    
    
  
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
    
    
More information about the Digitalmars-d-learn
mailing list