| 627 | } |
| 628 | |
| 629 | float WorldCallbacks::magnitude(World* world, Vec2F pos1, Maybe<Vec2F> pos2) { |
| 630 | if (pos2) |
| 631 | return world->geometry().diff(pos1, *pos2).magnitude(); |
| 632 | else |
| 633 | return pos1.magnitude(); |
| 634 | } |
| 635 | |
| 636 | Vec2F WorldCallbacks::distance(World* world, Vec2F const& arg1, Vec2F const& arg2) { |
| 637 | return world->geometry().diff(arg1, arg2); |