O'Reilly logo
  • Joseph Simpson thinks this is interesting:

// we need to limit the orientation values // to be in the range (0 – 360)


Cover of Unity 5.x Game AI Programming Cookbook


Why not use Clamp here?

Oh, I see. This adds or removed 360. This is to account for what happens when the agent is rotated more than 360.