diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Utils.hs | 4 |
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) | |||
52 | inside (p, q) (r, s) (a, b) = bet a (p, r) && bet b (q, s) | 52 | inside (p, q) (r, s) (a, b) = bet a (p, r) && bet b (q, s) |
53 | inside' (p, q) (r, s) (a, b) = bet' a (p, r) && bet' b (q, s) | 53 | inside' (p, q) (r, s) (a, b) = bet' a (p, r) && bet' b (q, s) |
54 | 54 | ||
55 | rotate (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, ...] |
56 | repeatF f = f : map (f .) (repeatF f) | 60 | repeatF f = f : map (f .) (repeatF f) |
57 | 61 | ||