Page 1 of 1

Line drawing with relative angle

Posted: Tue Jul 10, 2018 1:41 pm
by sarlaa
Hi,

I have as input a line and precesion for angle and length for second line to draw, knowing that the angle is relative to first line.

Is there a way to caclulate the point considering relative angle ?
soemthing like the function : RVector createPolar (double radius, double angle) but with relative angle.

Thanks.

Re: Line drawing with relative angle

Posted: Tue Jul 10, 2018 2:03 pm
by andrew
You can get the angle of a line using line.getAngle(), then add the relative angle to that.

Re: Line drawing with relative angle

Posted: Tue Jul 10, 2018 4:40 pm
by sarlaa
I see, thanks again.