round the translationXAfter variable to prevent assertion failed error