Removed useless code from `flipX`/`flipY`, and factorized the `translate`/`translateV` function