copy several more Vec2d functions from pymunk