These functions make it easy to calculate things about orientation and headings, while keeping the angles within -pi to pi.
1 2 3 4 5 6 7 | angle(x1, y1, x2, y2)
angle_diff(a1, a2)
mean_angle(x)
rotate(x, y, angle)
|
x1 |
X-coordinate for poinr 1. |
y1 |
Y-coordinate for poinr 1. |
x2 |
X-coordinate for poinr 2. |
y2 |
Y-coordinate for poinr 2. |
a1 |
Angle 1. |
a2 |
Angle 2. |
x |
A vector of angles. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.