Cast return value to double explicitly
The return type of the function is explicitly double
. This fixed type is then used in the ternary operator ?:
. If we write a FieldVector<T>
of some other type, the ternary operator cannot automatically deduce which type to return otherwise.
Edited by Simon Praetorius