I need check one condition regarding if the car is the similar (+/- 30 degrees) azimuth (compass direction) as the road.
Azimuth is an integer [0..359], 0 mean North
So if carAzimuth = 0 it is in the same general direction as other roads with roadAzimuth = [330, 345, 0, 15, 30]
So I create the formula to check for +/- 30
IF ( ABS(carAzimuth - roadAzimuth ) <= 30 OR
ABS(carAzimuth - roadAzimuth ) >= 330 ) THEN // 360 -30
I wonder if I can rewrite this without using ABS()

roadAzimuthhas a index to speed up search. But if I useABS()db cant use the index anymore because is a calculate value. So I need solve this using compare operator<>=and logic operatorand or– Juan Carlos Oropeza Jul 14 '16 at 02:16