Remove casting
article thumbnail

Casting Values

Grumpy Gamer

I was running into a bug in my new compiler where large ints where loosing precision. The both sides of trinary operator must return the same type, and in this case I was returning an INT and a FLOAT, so it cast the INT to a FLOAT before returning the value. I seem to recall being bitten by a similar bug 20 years ago.

Bug 40