chickadee » sdl2 » point-scale!

point-scale point factorprocedure
point-scale! point factor #!optional destprocedure

Efficiently multiply the X and Y values of point by factor (a float or integer). E.g. factor 0.5 halves the values, factor 2.0 doubles the values. sdl2:point can only hold integer values, so the results will be truncated to integers. The results will be clamped to the range -2147483648 to 2147483647.

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

Requires sdl2 egg 0.2.0 or higher.