File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 62
62
# =end
63
63
# @author https://github.com/SuperFola
64
64
(let recombine (fun (_f _g _h)
65
- (fun (_x &_f &_g &_h)
66
- (_f (_g _x) (_h _x)))))
67
-
65
+ (fun (_x &_f &_g &_h) (_f (_g _x) (_h _x)))))
Original file line number Diff line number Diff line change 136
136
137
137
(while (< _index (len _L)) {
138
138
(if (or (nil? _output) (< (@ _L _index) _output))
139
- (set _output (@ _L _index)))
139
+ (set _output (@ _L _index)))
140
140
(set _index (+ 1 _index)) })
141
141
_output }))
142
142
153
153
154
154
(while (< _index (len _L)) {
155
155
(if (or (nil? _output) (> (@ _L _index) _output))
156
- (set _output (@ _L _index)))
156
+ (set _output (@ _L _index)))
157
157
(set _index (+ 1 _index)) })
158
158
_output }))
159
159
Original file line number Diff line number Diff line change 379
379
# (print (clamp 6 0 10)) # 6
380
380
# =end
381
381
# @author https://github.com/SuperFola
382
- (let clamp (fun (_x _min _max)
383
- (max _min (min _x _max))))
382
+ (let clamp (fun (_x _min _max) (max _min (min _x _max))))
384
383
385
384
# @brief Linearly interpolate a value in [0; 1] between two bounds
386
385
# @param _x value to interpolate (must be between 0 and 1)
390
389
# (print (lerp 0.22 15 132)) # 40.74
391
390
# =end
392
391
# @author https://github.com/SuperFola
393
- (let lerp (fun (_x _v0 _v1)
394
- (+ (* (- 1 _x) _v0) (* _x _v1))))
392
+ (let lerp (fun (_x _v0 _v1) (+ (* (- 1 _x) _v0) (* _x _v1))))
You can’t perform that action at this time.
0 commit comments