Update scalar.h

compare by reference