I have an image with two points, aligned something like this:
|----------------|
| |
| . |
| |
| . |
| |
|----------------|
I have both X, Y coordinates for both points and I need to rotate the image X degrees so it looks like this instead:
|----------------|
| |
| |
| . . |
| |
| |
|----------------|
Basically so they align next to eachother, what's the math for this? (A code example in C# would be even better but not required)