| 459 | } |
| 460 | |
| 461 | inline Vec Vec::clampSafe(Rect bound) const { |
| 462 | return Vec( |
| 463 | math::clampSafe(x, bound.pos.x, bound.pos.x + bound.size.x), |
| 464 | math::clampSafe(y, bound.pos.y, bound.pos.y + bound.size.y) |
| 465 | ); |
| 466 | } |
| 467 | |
| 468 | |
| 469 | // Operator overloads for Vec |