chickadee » sdl2 » point-unscale!

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

Efficiently divide the X and Y values of point by factor (a float or integer). This is equivalent to (point-scale point (/ 1 factor)), but is more convenient and efficient (especially if factor is an integer).

These procedures signal an exception if factor is 0. 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-unscale returns a new managed sdl2:point.
  • point-unscale! modifies and returns dest. If dest is omitted, point is modified and returned.

Requires sdl2 egg 0.2.0 or higher.