{-----------------------------------------------------
flipX:(x,y)-->(x,-y) flipY:(x,y)-->(-x,y)
y y
^ * (x,y) (-x,y) * ^ * (x,y)
| / \ / \ | / \
| *---* *---* | *---*
+---------> x ----------+----------> x
| *---*
| \ /
| * (x,-y)
-----------------------------------------------------}
flipX :: Region -> Region
flipX = Scale (1, -1)
flipY :: Region -> Region
flipY = Scale (-1, 1)
----- data/type used in this exercise -----
data Region = Scale Vector Region
type Vector = (Float, Float)
This entry was posted
on Thursday, May 31st, 2007 at 3:30 pm and is filed under Haskell - SOE.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.