Ok, i would want to change this to:
```c
// transfer attActual.Yaw from (-180 ... 180) to (0 ... 360) and round to nearest integer
int16_t heading;
if (attActual.Yaw < 0)
	heading = (int16_t)(attActual.Yaw - 0.5f) + 360;
else
	heading = (int16_t)(attActual.Yaw + 0.5f);
```
Rationale:
* I assume attActual.Yaw as being guaranteed within -180 ... 180
* I don't want to use roundf (which returns float) in conjuction with a cast to int because that may generate wrong results depending on float being able to represent all ints between -180 and 180. Even if that is true in this case (i would assume so) it would serve as a bad example which could go wrong on bigger ranges.
* This code copies the behavior of roundf (round to nearest integer but round halfway cases away from zero
* The range move is applied after type conversion to make it more lightweight