Is it possible to overload the double = operator?
We're having some trouble with calculations in our software because of the issues converting floats to doubles. Nearly all variables are floats but there are thousands of calls to DLLs that require doubles and the slight differences are causing problems.
float fVal = 7.f;
double val = fVal;
The double ends up coming out to something like 7.00000051351
One solution is to convert all our float variables to doubles, but you can imagine how messy that could get.
Maybe I'm barking up the wrong tree and the operator I need to overload is the float () operator to cast it into a double.
I'm not sure if it's even possible. Just wondering if anyone has any brilliant solution for this. I haven't found anything after alot of searching.