I found an existing report describing similar behavior with 3D PVectors (processing/processing#2045), but it appears the same problem affects 2D PVectors as well.
When either the start or end PVector is (0,0) the output of angleBetween() is always 0.
I'm not particularly experienced with Processing, so it's entirely possible that I'm misunderstanding something or using the API incorrectly. I tend to pick it up every few months for small projects and then promptly forget most of what I learned.
That said, I've spent some time testing this behavior and looking into the implementation, and based on what I found, I would not expect the angle to be 0 in the cases I tested.
Edit: I forgot to add, I'm using processing 4.5.2

I found an existing report describing similar behavior with 3D PVectors (processing/processing#2045), but it appears the same problem affects 2D PVectors as well.
When either the start or end
PVectoris(0,0)the output ofangleBetween()is always 0.I'm not particularly experienced with Processing, so it's entirely possible that I'm misunderstanding something or using the API incorrectly. I tend to pick it up every few months for small projects and then promptly forget most of what I learned.
That said, I've spent some time testing this behavior and looking into the implementation, and based on what I found, I would not expect the angle to be 0 in the cases I tested.
Edit: I forgot to add, I'm using processing 4.5.2