I needed this for a 3D engine I'm working on, so I could have a sprite point towards a pair of coordinates that were off screen. (Sprites can't go off screen so I had to remake the "point towards' block.
Credit to @Wheatley_Animations for doing the math. Thank you! Please check out his stuff.