get deflection angle - ksoltan/RoboFish GitHub Wiki
get_angle
Calculates angle of vector defined by two points with respect to the +x axis.
Parameters:
prev_base_pt - Coordinates of initial point of previous joint
base_pt - Coordinates of initial point of current joint,
also the terminal point of previous joint
cross_pt - Coordinates of terminal point of current joint that
defines its vector.
Returns:
Angle in degrees between two joints, defined with respect to the
line of the previous (preceeding) joint.
Relative angles calculated wrt +x axis, so if joint at (-2, 2), will
assume rotation from 1st to 2nd quadrant instead of from 1st to 4th
to 3rd to 2nd.