I often have this kind of statement in my code :
(b != 0) ? a / b : a
In terms of speed and best C++ pratice, is it better to do a function
float divifnotzero(a,b) { ... return ... }
or a preprocessor macro like this ?
#define divifnotzero(a,b) ((b!=0)?a/b:a)