Commit graph

3 commits

Author SHA1 Message Date
NepDisk
ed7b667aa7 Update File headers to use BLANKART 2025-04-19 13:33:28 -04:00
James R
b50d34e8b5 Add srb2::sweep, AABB line sweep algorithms 2024-12-25 13:21:23 -05:00
James R
c2949ae031 Add srb2::math, fixed-point, vector, line and slope formula classes
- srb2::math::Fixed
  - Operator overloads for FixedMul and FixedDiv
  - Implicit conversion between fixed_t, Fixed and
    floating-point types
- srb2::math::Vec2
  - Template to any type
  - Operator overloads for arithmetic operations
  - Convertible between different types
- srb2::math::LineSegment
  - Template to any type
  - Holds two Vec2 instances
  - Sorting methods and vertical/horizontal test
- srb2::math::LineEquation
  - Slope formula from LineSegment
  - y method to find y from x
  - Intersect algorithm
  - Fixed-point specialization to avoid overflows
- srb2::math::LineEquationX
  - Inherits LineEquation
  - x method to find x from y
2024-12-25 13:03:50 -05:00