I am creating a day/night system where I have a 24 hour clock that represents the full cycle of a day. Some values of this system can be modified such as the speed of time and the length of the day and night (in case we want to make longer days and shorter nights or vice versa).
What I need specifically is for the sun to rotate adapting to these values (speed of time and length of day and night) starting from a specific angle, so the sun rotates 150 degrees in total, from 165º at the start of the day to 15º at the end. I have tried some formulas and I haven't been able to achieve it, so I ask for help to see if someone can give me a hand.
I attach an example with a basic formula to you guys can better understand what I need.
Thanks in advance!