7 Commits

Author SHA1 Message Date
mcc
6e1cf4be56 Manual merge PR#51 2020-05-03 12:46:30 -04:00
mcclure
d4f7cd1280
Merge pull request #50 from mcclure/master
:round(precision) methods for vec2, vec3, bound2, bound3
2020-05-03 12:37:58 -04:00
mcc
e3f817bf7e extend(vec) and extend_bound(bound) for bounds
expands bounds to cover new points
2019-11-30 01:24:48 -05:00
mcc
8e65db07ce :round(precision) methods for vec2, vec3, bound2, bound3
Uses utils.lua, which requires moving utils.round to a new _private_utils.lua
2019-11-30 00:03:55 -05:00
mcc
d845a479ac Fix typo in bound3 test which was breaking under LuaJIT 2019-11-29 21:08:04 -05:00
mcc
7fa1785469 Fix failing tests; this involves changing 2 bad tests and 1 bad behavior:
- vec2 to_polar/from_cartesian tests were testing for equality rather than using an epsilon.
- bound2.contains had two tests that were plain wrong.
- While I'm fixing the bounds test, bound2.contains and bound3.contains probably ought to test their own min and max values for inclusion.
- The implementation of mat4.look_at appears to be wrong. The final column was being set to 0,0,0,1 which comparing against other implementations does not seem to be correct. My replacement code is modeled on the method used in mat4x4_look_at() in linmath.h in GLFW, which says it's a reimplementation on the method from gluLookAt(). With this change the test passes as originally written.
2019-11-29 17:16:20 -05:00
mcc
7c18a65695 Bound2, bound3: Add tests and fix several major bugs so that those tests pass. 2018-01-27 00:46:56 -05:00