Max Cahill
e10a6bf498
fixed typo meaning z could fallback incorrectly in vec3:sset
...
fixes #73
2024-07-15 12:13:10 +10:00
David Briscoe
8d41c6d3d1
lint: Fix whitespace issues
...
Remove excess whitespace and remove related ignores.
2022-03-03 10:17:34 -08:00
Max Cahill
a339854651
fixed vec2/vec3 crashing on attempted copy construction from something that had a type field which wasn't a callable type() method (eg objects from tiled)
2021-07-16 19:23:59 +10:00
Max Cahill
3cc177a0c0
BREAKING class interface refactor - all classes will need a minor update, see class.lua
...
tl;dr is that new no longer needs to call init, calling :new() directly in user code is not allowed, properties are copied, metamethods work, and a config table is needed rather than a class to extend from, so use {extends = superclass} if you want a minimal fix
2021-07-15 16:15:27 +10:00
Max Cahill
9fbe8cc3c4
[fixed] typo in vec3 tostring
2020-04-08 21:25:42 +10:00
Max Cahill
afd279f1db
[added] tostring for vec2 and vec3 - not sure how to handle wanting more/less precision for these currently.
2020-04-08 21:10:03 +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
9422152181
[added] math.lerp_eps and matching vec2/vec3 methods; for ensuring a lerp actually reaches its destination once the delta doesn't matter
2020-04-01 20:58:18 +11:00
Max Cahill
870d291369
[modified] optimised vec3 swizzling
2020-04-01 20:56:36 +11:00
Max Cahill
ad2fc71e7a
[fixed] non-global compatible
2020-03-15 21:22:22 +11:00
Max Cahill
66a9f41474
[modified] renamed to batteries, added global export suppression and more documentation
2020-03-15 20:28:50 +11:00
Max Cahill
94005675e9
[fixed] vec3:new - seldom used but still important
2020-02-26 15:25:02 +11:00
Max Cahill
63448b5d5e
[added] vec3.lua (very quick work, probably would benefit from tests)
2020-01-29 21:12:14 +11:00