This topic is now archived and is closed to further replies.

Mark Sheeky

Strange casting speed anomaly

Recommended Posts

Look at this line angle+=(short)((vx*cos+vy*sin)*agility); angle is a short but the rest are floats. The odd thing is I get faster execution if agility is a short... this is unexpected anyone know why? This is in VC6, is the compiler casting the first part only and later multiplying agility and therefore ignoring the bracket? Mark

Share this post

Link to post
Share on other sites