Board Thread:Questions and Answers/@comment-24653983-20150924171218/@comment-1595298-20150924184442

I was going to post something about dot products but it didn't go through. Then I realized that Petit Computer doesn't have an arcsine function, unlike SmileBASIC. However, we can probably use arctan.

If the slopes of the two lines A and B are expressed as vectors (AX,AY) and (BX,BY), you can get each angle in radians relative to the positive x-axis by using ATAN(AX,AY) and ATAN(BX,BY). Then subtract them and you have the angle between them, and you can use DEG to convert to degrees if necessary. If you want the angle within a particular range (since this can return anything from -360 to 360), you might have to conditionally mess around with the result to get it where you want.