I am working on a project in javascript and p5.js and am stuck at this point. I have to rotate a line from one of its ends with a certain angle in Radians/Degrees. Here's what I want to get-the image
Sorry for my bad drawing. So I want a formula to get C(x,y) to use in my code.
What should be the values of x and y in terms of t-ratios and x1,y1,x2,y2
Sorry,flip the positions of A and B.

