Explanation:
d < 0 : clockwise
d >= 0 : counterclockwise
think back to trigonometry and angles per se.
0 degrees is considered flat right in the middle.
with growing degrees the indicator moves counterclockwise.
90 degrees is then at the top in the middle.
180 degrees is flat on the left in the middle.
270 degrees is at the bottom in the middle.