I am trying to rotate an arrow that shows the wind direction with transform: rotate().
I get the value in degrees from an api-fetch, and the standard way of measuring wind direction is to measure the way the wind comes from, and my arrow needs to point at the opposite direction to properly show the wind flow.
style={{transform: `rotate(${weatherData.parameters.wd.values}deg)`}}
What I've tried is adding "+180" to my value, but that doesn't work right when the value becomes greater then 360degrees.
Any ideas?