David Briscoe
0c193d7901
lint: Don't assign values that will never be used
...
No bugs here, but giving an initial value can hide cases where we fail
to set a value. Use an assert instead so we can see errors if we change
and break this code.
Except break_next which goes out of scope after it's assigned (I guess
it used to be outside the loop).
2022-03-03 10:17:35 -08: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
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
monolifed
e9687d763f
rgb to hsl
2021-06-06 09:00:43 +03:00
Max Cahill
7185a91fc5
[dev] note about oklab colour space
2021-01-15 16:22:01 +11:00
Max Cahill
e957a4502f
[added] colour.distance_rgb and distance_packed_rgb
2020-08-18 19:54:24 +10:00
Max Cahill
324a5b4783
[dev]
2020-08-12 20:27:28 +10:00
Max Cahill
ba221060c5
[modified] colour fairly extensively; renamed functions to same snake_case convention as other modules
...
[added] colour.hsl_to_rgb
2020-06-15 21:11:05 +10:00
Max Cahill
6386aaf298
[modified] big refactor to localised modules and require("batteries"):export()
for global usage; renamed files table
to tablex
and math
to mathx
to allow using the library in your module root if you really want to.
2020-04-07 13:49:10 +10:00
Max Cahill
66a9f41474
[modified] renamed to batteries, added global export suppression and more documentation
2020-03-15 20:28:50 +11:00