~technomancy/tremendous-quest-iv

tremendous-quest-iv/util.fnl -rw-r--r-- 407 bytes
a3c24536Phil Hagelberg Bump to Fennel 0.9.1; fix some bugs. 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
(fn scale-points [scale px py ...]
  (when (and px py)
    (values (* px scale) (* py scale) (scale-points scale ...))))

(fn transform-points [tx ty px py ...]
  (when (and px py)
    (values (+ px tx) (+ py ty) (transform-points tx ty ...))))

(fn floor-points [x y ...]
  (when (and x y)
    (values (math.floor x) (math.floor y) (floor-points ...))))

{: scale-points : transform-points : floor-points}