I've been trying to find a formula to figure out if a car is turning left or right given two sets of coordinates. x1,y1 is at t seconds, and x2,y2 is at t+1 seconds. Up until now, I've been using this:
double direction = atan2(y2 - y1, x2 - x1)
Then, I check to see if the direction is positive or negative to find out if the car is turning left or right. This works, but I don't need to know the value of the direction at all. I just need the sign. Plus, I'd like to get away from using atan2 which can be expensive. Is there another formula I can use for this? Thanks!
Edit1:
I have velocity. The time between the two points is always one second apart, so it can be calculated if needed.
Edit2: Here's what I mean by turning: I'm dealing with data from a traffic simulation that's not 100% realistic. Normally, I have the heading (in degrees) of the car. However, when a car changes lanes, the heading is inaccurate (appears to travel diagonally). So, in this case I've already determined that the car is changing lanes. I need to skew the car's heading by 20 degrees or so. I just need to figure out which direction to change the heading, which is why I need to figure out what direction the car is "turning" in while changing lanes.