perfectly fluid animation transition - changed approximate calculation