Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Dim caneta As New Pen(Color.FromArgb(127, 0, 100, 10), 40)
path.FillMode = Drawing2D.FillMode.Winding
e.Graphics.DrawPath(caneta, path)
d.x = b.x - a.x
d.y = b.y - a.y
distance = sqrt (d.x * d.x + d.y * d.y)
nab.x = d.x / distance;
nab.y = d.y / distance;
sine = (nab.y * nbc.x) + (-nab.x * nbc.y)
cosine = (nab.x * nbc.x) + (nab.y * nbc.y)
The sine will be zero if a, b and c make a line. It will be positive or negative if the path bends left or right. The cosine will be negative if the path bends more than 90 degrees left or right.
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.