Commit Graph

417 Commits

Author SHA1 Message Date
Max Cahill
f3e299e3c9 fixed pubsub using set but not requiring it (breaks without :export())
fixes #44
2021-11-23 10:45:09 +11:00
Max Cahill
f5eda744b9 clarified declaration of h in colour.rgb_to_hsl
fixes #43
2021-11-23 10:41:09 +11:00
Max Cahill
5df717fe6d used mathx for clamp01 in intersect
fixes #45
2021-11-23 10:25:09 +11:00
Jesse Viikari
a42f1190e0 Modified weighted random pick function
- Now accepts a table from which it will pick the random value from,
  instead of an index
- Changed function name to better reflect the way it now works
2021-11-19 10:03:40 +02:00
Max Cahill
7767802433 chased down more math vs mathx usage (and actually fixed the random_lerp usage) 2021-11-19 15:35:52 +11:00
Max Cahill
4460a94933 mathx.random_lerp calls mathx.lerp instead of math.lerp so it works without exported globals
fixes #41
2021-11-19 15:28:54 +11:00
Max Cahill
6ce0dfa523 fixed wrong inequality :) 2021-11-18 15:18:58 +11:00
Max Cahill
774965a508 added async.wait for waiting for a certain period of time inside an async task 2021-11-18 15:15:48 +11:00
Max Cahill
31bfe92d37 added todo for tablex.weighted_random, removed returning the weight value as multi-return wasn't documented and could break in some circumstances 2021-11-18 10:35:26 +11:00
Max Cahill
7aa476a58c
Merge pull request #40 from speakk/weighted_random
Add a weighted random pick for tablex
2021-11-18 10:25:48 +11:00
Jesse Viikari
7eb6bcc576 Add a weighted random pick for tablex 2021-11-17 20:20:04 +02:00
Max Cahill
63a1cf5438 Merge PR #39: add ripairs
minor: touched up whitespace/naming/comments
2021-11-11 13:47:24 +11:00
Max Cahill
8aa6107056 made tablex relative require consistent with other modules 2021-11-11 13:42:03 +11:00
Westerbly Snaydley
cf8e0ac81a add ripairs (reverse ipairs) 2021-11-09 23:45:01 -05:00
Max Cahill
65d8f24a45
Merge pull request #38 from radgeRayden/master
Fix intersect depending on exported mathx
2021-10-26 10:06:40 +11:00
Westerbly Snaydley
271d079bbb Fix intersect depending on exported mathx 2021-10-24 18:32:14 -05:00
Max Cahill
0629e349a4 Merge remote-tracking branch 'origin/master' 2021-10-22 12:40:29 +11:00
Max Cahill
bbc34ddb5b added measure.lua benchmarking helpers - todo ones that aid inline profiling, probably just wrapping some code and measuring time/memory deltas each run 2021-10-22 12:40:23 +11:00
Max Cahill
50053b6674
Merge pull request #37 from Sheepolution/patch-1
Fix parameter/argument name mismatch
2021-10-21 13:13:44 +11:00
Max Cahill
1d430bd6a9 added todo note about auto-pooling 2021-10-19 15:41:40 +11:00
Sheepolution
95269b3362
Fix parameter/argument name mismatch 2021-10-19 03:04:55 +02:00
Max Cahill
c10338fa5d Added (more helpful) error on first use rather than on require when missing bitops library for colour.pack/unpack methods
fixes https://github.com/1bardesign/batteries/issues/35
2021-10-19 11:48:16 +11:00
Max Cahill
5b49cbdc17 Added installation note about package.loaded and LUA_PATH for init.lua
fixes https://github.com/1bardesign/batteries/issues/36
2021-10-19 11:35:18 +11:00
Max Cahill
0eda6e8262 added functional.chain for conveniently mapping things like node paths and vector splines 2021-10-15 12:49:31 +11:00
Max Cahill
eae1849c16 fixed filter_inplace doesn't return anything, thanks sheepolution 2021-10-12 11:51:17 +11:00
Max Cahill
0ebe5b1e9f added async.stall to canonicalise the stalling mechanism for async users 2021-10-08 16:17:18 +11:00
Max Cahill
27b548bb25 changed tablex.rotate loop bounds to be more defensive about fractional arguments being passed 2021-10-08 10:19:30 +11:00
Max Cahill
0a02d7a2da Merge feature/tablex.rotate
refactored to use loops instead of recursion for simplicity
2021-10-08 10:17:34 +11:00
flamendless
8a069c38d4 [tablex] Add rotate 2021-10-03 17:31:55 +08:00
Max Cahill
754faecd02 fixed pingpong backwards 2021-09-24 11:48:25 +10:00
Max Cahill
107cad43e5 added some more easing curves to mathx 2021-09-24 11:44:53 +10:00
Max Cahill
c70b463af1
Merge pull request #31 from chrsm/chrsm/fix-generate_2d
functional: fix generate_2d return value
2021-08-15 17:01:36 +10:00
chrsm
c740614cb9
functional: fix generate_2d return value 2021-08-14 20:51:45 -07:00
Max Cahill
36e3261534 Merge remote-tracking branch 'origin/master' 2021-08-14 19:10:20 +10:00
Max Cahill
2b6a6d8f53 pretty format: circular reference ids only apply in their own reference tree
so, repeated but not circular data is repeatedly output
helpful for serialisation-like uses and more clear because the id was not printed on the actual data structure in this case
2021-08-14 19:10:12 +10:00
Max Cahill
0dfb74317f
fix another typo in make_pooled 2021-08-13 10:56:53 +10:00
Max Cahill
7fe9234708
Merge pull request #30 from FlamingArr/master
A minor typo-fix
2021-08-12 15:43:42 +10:00
FlamingArr
92406fa983
Fix a typo in make_pooled 2021-08-12 00:53:03 +05:30
Max Cahill
ad8012c89b added normalize alias for americans to vec2 2021-08-09 19:27:29 +10:00
Max Cahill
918c9438cd Merge branch 'feature/vec2-friendly-api' 2021-08-09 19:07:28 +10:00
Max Cahill
fa742beb50 reorganised some of vec2, added some missing copying methods 2021-08-09 19:07:03 +10:00
Max Cahill
4bb3da7603 slightly tweaked vec2 new 2021-07-23 14:38:14 +10:00
Max Cahill
a61a8a8618 added reversed-order methods for intersect (some missing) 2021-07-23 14:34:47 +10:00
Max Cahill
1a40c1ef27 added aabb as an acronym for camelCase 2021-07-23 14:26:26 +10:00
Max Cahill
f835dd6e66 vec2 api finalisation and testing, updating intersect to new api 2021-07-23 14:15:30 +10:00
Max Cahill
635bf506dc Merge remote-tracking branch 'origin/master' into feature/vec2-friendly-api 2021-07-23 11:04:23 +10:00
Max Cahill
cb35811b8c start of vec2 friendly api - will settle on something here before touching vec3 2021-07-23 10:58:21 +10:00
Max Cahill
3b739380e4 manual_gc cleanup/clarification and default arguments 2021-07-23 10:53:29 +10:00
Max Cahill
6d0f21a7c0 readme cleanup 2021-07-23 10:53:16 +10:00
Max Cahill
1a8769fc22
removed debug print from :camelCase() 2021-07-22 09:06:12 +10:00