Rotate by d radians. Mouse X and Y should be kept.
This function was not applied when jug/IDDEA merge.