Just curious, is there a hit for casting from 0 to 0.f, or not as the bit representation is the same?
Just curious, is there a hit for casting from 0 to 0.f, or not as the bit representation is the same?
Nope.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Casting of constants will generally be done by your compiler at compile time, not affecting runtime speed at all.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"