I have a set of angles(finite set) these are float numbers.

I need the formula to return all angles from my set that lie within a given range

Example

my set{20.33,35.55,330.00,30.00,50.00}

i will give input two angles 30,330 and i want it to return all the angles within this range.

Also that 330,30 is also a valid range.

Thanks in advance