chickadee » sdl2 » point-add!

point-add point1 point2procedure
point-add! point1 point2 #!optional destprocedure

Efficiently add point1 and point2 (vector addition). 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 point-move, instead of creating an sdl2:point.

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

These procedures are available in sdl2 egg version 0.2.0 and higher.