moving the iterator to the loop would do the trick:
for rotatefeat in rotateBUFF.getFeatures():
for pointfeat in pointLayer.getFeatures():
Also, you don't need to commit changes if you work on the data provider. There are 2 ways to edit data:
- on the layer using its edit buffer, but you must enable the editing first. Once editing is finished, you must commit the changes.
- on the data provider as you need. No need to commit changes, they are applied directly when using changeAttributeValues.
Usually, it is recommended to edit on the layer to prevent modifications on layers which are not in edit mode. This is particularly true for plugins. But, if this code is strictly for you, it might be easier to work with the data provider. One advantage for the edit buffer is that you can commit changes at once, and if something went wrong during the loop, discard the changes.