utils · Other tools

openpibo.utils.calculate_angle(p1, p2, p3)[source]

Calculates the angle of the three points p1-p2-p3. (centered at p2)

Parameters:
  • p1 (tuple) – First point (x, y)

  • p2 (tuple) – Middle point (x, y) — the vertex of the angle

  • p3 (tuple) – Last point (x, y)

Returns:

Size of the angle p1-p2-p3 (in degrees)