Another method is to use normal vectors and the law of cosines.

Before I start, are vectors Direction and CarPointer world coordinates or are they direction vectors from CarCenter?

If they are world coordinates, get them into direction vectors first:

`SimpleVector a = directionCoordinate.calcSub( carCenter ).normalize();`

SimpleVector b = carPointerCoordinate.calcSub( carCenter ).normalize();

If they are already direction vectors from CarCenter, then just normalize them:

`SimpleVector a = new SimpleVector( direction ).normalize();`

SimpleVector b = newSimpleVector( carPointer ).normalize();

Now think of vectors "a" and "b" as two sides of a triangle, both with length=1 (since we normalized them). To get the length of the third side:

`float lengthC = b.calcSub( a ).length();`

So now you have three sides of a triangle. To calculate the angle between sides A and B, use the law of cosines (plugging in values A=1, B=1, and C=lengthC):

`float theta = (float) Math.acos( (2.0f - (lengthC * lengthC) ) / 2.0f );`

NOTE: I used acos in the above formula, so theta will never come out to be more than PI radians (if the actual angle is larger, the formula will return 2*PI - angle).