I'm writing an application where I need to be able to plot points onto a rounded rectangle.
I know the angle from the center from 0 degrees to where the point needs to be. I need to know the x and y coordinates of where a line from this angle would meet the rectangle.
For a circle this would be something like x = sin(angle) * radius + centerx y = cos(angle) * radius + centery
What i need is the equivalent formula for doing this on a rectangle and ideally a rounded one.
Thanks
