Implement multi dimensional rotation