Commit Graph

8 Commits (979533092ef2edd949675db16eb8a4ae5cf5a361)

Author SHA1 Message Date
En Yi 3f5e1648c1 Fix regression in AABB collision 2023-11-16 00:03:26 +08:00
En Yi cdb9d22e6c 'Fix' unused params for remaining functions 2023-11-11 13:10:00 +08:00
En Yi cb703877cb Add simple test for mempool 2023-08-13 14:54:10 +08:00
En Yi 494c9e9e46 Fix incorrect line test
By this project convention, the line extend will start from p1 and
end at p2, but not including p2 [p1, p2). Thus, existing tests are
testing a zero-length line, which should assert no collision.

Add test to properly test AABB edge collision with a line

Also update existing collision function to account for this
2023-08-13 12:34:27 +08:00
En Yi 451b241460 Correct AABB tests
Changelog:
- Figure out why the previous AABB behaviour was correct: continuum
    [0, 5) does not collide with [5, 10)
    For tile check however, need to subtract one to avoid extra tile
    check. Exception is the tile collision
2023-06-21 22:11:32 +08:00
En Yi 7767b38221 Add line-AABB collision check function 2023-06-20 22:23:32 +08:00
En Yi d455cbc6b9 Add test for AABB collision functions
Internal Changelog:
- Fix some off-by-one errors
2023-06-16 15:18:03 +08:00
En Yi ca621bf798 Integrate CMocka to do unit testing 2023-06-16 11:51:22 +08:00