Skip to content

Commit

Permalink
add scale2
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcallister committed Oct 27, 2011
1 parent 0b45a68 commit 7f823bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Propane/Transform.hs
@@ -1,5 +1,5 @@
module Propane.Transform
( scale, translate, rotate
( scale, scale2, translate, rotate
, speed, shift
, unbal, balun
, spaced
Expand All @@ -10,6 +10,9 @@ import Propane.Types
scale :: R -> Image a -> Image a
scale s im (x,y) = im (x/s, y/s)

scale2 :: (R,R) -> Image a -> Image a
scale2 (sx,sy) im (x,y) = im (x/sx, y/sy)

translate :: R2 -> Image a -> Image a
translate (dx,dy) im (x,y) = im (x-dx, y-dy)

Expand Down

0 comments on commit 7f823bd

Please sign in to comment.