I'm using the particle spray object for a 30 degree spray relative to the player. It works fine for most directions, but I can't get it to work when it loops back over from 360 to 0.

The equations I have for the starting and ending angles are:

(Dir("Hero")/32.0)*360+15
(Dir("Hero")/32.0)*360-15

I've tried switching them and adding 360 to them, but it won't recognize that the angles that I want when your direction is ~0.