Code review comment for lp:~3v1n0/unity/callgrind-improvements

Revision history for this message
Adrian Wechner (adrian-wechner) wrote :

197 + result.rotation.x = start.rotation.x + (end.rotation.x - start.rotation.x) * progress;
198 + result.rotation.y = start.rotation.y + (end.rotation.y - start.rotation.y) * progress;
199 + result.rotation.z = start.rotation.z + (end.rotation.z - start.rotation.z) * progress;

This could be shorten by:
basically what you do is +val1 + val2 - val1 => well val1 would then be 0
(maybe the compiler would optimize that anyway)

result.rotation.x = end.rotation.x * progress;
result.rotation.y = end.rotation.y * progress;
result.rotation.z = end.rotation.z * progress;

doesn't it?

« Back to merge proposal