aboutsummaryrefslogtreecommitdiff
path: root/lib/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Utils.hs')
-rw-r--r--lib/Utils.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Utils.hs b/lib/Utils.hs
index 6358230..56d9c69 100644
--- a/lib/Utils.hs
+++ b/lib/Utils.hs
@@ -52,6 +52,10 @@ shear c (x, y) = (c * x, c * y)
52inside (p, q) (r, s) (a, b) = bet a (p, r) && bet b (q, s) 52inside (p, q) (r, s) (a, b) = bet a (p, r) && bet b (q, s)
53inside' (p, q) (r, s) (a, b) = bet' a (p, r) && bet' b (q, s) 53inside' (p, q) (r, s) (a, b) = bet' a (p, r) && bet' b (q, s)
54 54
55rotate (x, y) t = (nx, ny)
56 where nx = x*cos(pi*t/180) - y*sin(pi*t/180)
57 ny = x*sin(pi*t/180) + y*cos(pi*t/180)
58
55-- [f, f.f, f.f.f, ...] 59-- [f, f.f, f.f.f, ...]
56repeatF f = f : map (f .) (repeatF f) 60repeatF f = f : map (f .) (repeatF f)
57 61