Attempting to rotate an arrow indicating wind direction using the transform: rotate() property.
The data for rotation is retrieved from an API fetch, and conventional measurement of wind direction involves indicating where the wind is coming from. Therefore, the arrow must point in the opposite direction to accurately display the wind flow.
style={{transform: `rotate(${weatherData.parameters.wd.values}deg)`}}
I have experimented with adding "+180" to the value, but this approach proves ineffective when the angle exceeds 360 degrees.
Any alternative suggestions?