chickadee » sdl2 » rect-add-point!

rect-add-point rect pointprocedure
rect-add-point! rect point #!optional destprocedure

Efficiently move rect by adding point to rect's X and Y values. The results will be clamped to the range -2147483648 to 2147483647.

If the dx and dy values are already held as separate variables, it is more efficient and convenient to use rect-move, instead of creating an sdl2:point.

  • rect-add-point returns a new managed sdl2:rect.
  • rect-add-point! modifies and returns dest. If dest is omitted, rect is modified and returned.

Requires sdl2 egg 0.2.0 or higher.