Working with floats in C/C++? Fncs like fmod(), fmin(), fabs() etc. actually use doubles internally (floats get promoted on call). For better performance with float data, use the 'f' suffix versions: sinf(), sqrtf() are obvious, fmodf(), fminf() less so. Easy to overlook, but matters in tight loops!
3 months ago