--------------------------------------- alias float Real; Real lerp(Real t, Real a, Real b) { Real s2 = t * b; writeln("t*b= ", s2); writeln("t*b= ", t * b); return s2; }
Output: t*b= 1.5 t*b= 1.5 ------------------------------------- alias float Real; Real lerp(Real t, Real a, Real b) { Real s1 = (1.0 - t) * a; Real s2 = t * b; writeln("t*b= ", s2); writeln("t*b= ", t * b); return s2; } Output: t*b= 0 t*b= 1.5 -------------------------------------
I presume this is another DMD bug?
yes.