Little Angular Problem

Say I have an angle range (forming a sector - “piece of pie”). And I want to test a point to see if it falls in that area. Of course, simple way would be to take an angle, and test to see if its within the range.

Using Math.atan2 its simple, but you still can’t get a full 360 rotation. (i mean, you can, but you’ll eventually hit -3.154, and it’ll jump to 3.154) So if I wanted to test for a range of 0.4, from 3, I’d be checking from 2.6 to 3.4, and not 2.6 to -0.246, which is what i need.

Question is: is there any simple code that’ll do this? Or do i have to do my own math - sigh -

Thanks in advance