Well, this may seem like a strange question, but it is interesting. I encode iOS, and I was told that it is always better to multiply rather than divide the values, since it is faster.
I know that processors these days probably make this a problem, but my curiosity is better than me, and I wonder if anyone can shed light on this for me.
SO ..... My question is -
is:
player.position = ccp(player.contentSize.width / 2, winSize.height / 2);
slower than:
player.position = ccp(player.contentSize.width * 0.5, winSize.height * 0.5);
source
share