It shouldn't matter that angle() returns something like -90 instead of 270. If your math correctly takes in to account the cyclical nature of rotation, they are identical. Usually people get this wrong because they treat angles as linear numbers, e.g. trying to use lerp between angles, where lerping 50% of the way from 30 to 350 degrees will go the long way round to 190 degrees instead of the shorter way round to 10 degrees. In other words, the normal lerp expression doesn't take in to account angles wrap back around. (This is why the anglelerp expression exists - it uses different math to solve this problem.)
While solutions using things like (x + 360) % 360 can work for some cases, that does not usually solve wrapping problems, since it's still linear math.