set angle programmatically

I was just searching for an option to set the angle without a touch from a user - so lets do it programmatically