Rotation2d from one Translation2d to another

how do I get the angle from one translation2d to another translation2d? Is there a built-in function for that, or is it just some math?

You can do the following:

Rotation2d angle = new Rotation2d(pointA.getX() - pointB.getX(), pointA.getY() - pointB.getY());
1 Like

I think you can do tA.minus(tB).getAngle(). (But check, I am on my phone now).

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.