Get the other body than the argument in the joint
Body otherBody(Body body) { assert(containsBody(body), 'Body is not in the joint'); return body == bodyA ? bodyB : bodyA; }