Thanks a lot for the sample code.
My car is moving in a curve and there are solid lines on its right and on its left, so I need to know if its Moving in a curve AND passing left of the solid line, I have to deduct some score.
The problem is the car needs to be moving in a curve for +/- 1 second before you can see if it is indeed moving in a curve. Chances are that the logic you want to do has some other way of triggering.
Code is here to keep topic small:
I didn't bother to check it or to even spell check it. As you can see the code for this isn't the best code to use in a game. You could use angular velocity and just check that it's not so large that it's a turn or so small it doesn't matter.
The problem is that knowing if something is a curve takes 2 dimensions in this case position and time. There must be a better solution so can you please elaborate on what you want to do?