It's already there,
Step 1: long press on the screen.
Step 2: tap "Preferences"
Step 3: tap "About"
Step 4: tap version 7 times, you will unlock developer options.
Step 5: tap "Auto rotate screen" if you find this option to be locked go to settings and turn on auto rotate and then the rotate option in developer options will get unlocked.