Press space to randomize the arm lengths There is an odd behavior if your mouse gets too close, and I'm not sure how to solve it. If you know how, let me know!
Math adapted from https://robotacademy.net.au/lesson/inverse-kinematics-for-a-2-joint-robot-arm-using-geometry/ for @TheKnewGreg