Discussion Overview
The discussion revolves around solving the problem of determining whether an angle C lies between two other angles A and B, specifically in the context of a line of sight algorithm for a roguelike game. The focus is on handling angles that span across the 0/360-degree boundary and ensuring consistent results in the algorithm.
Discussion Character
- Technical explanation
- Debate/contested
- Mathematical reasoning
Main Points Raised
- One participant describes the need to handle angle ranges such as between 45 and 225 degrees and vice versa in a single equation for programmatic efficiency.
- Another participant suggests a simple condition of x > 45 and x < 225 as a potential solution, though this may not address the full complexity of the problem.
- A participant elaborates on the algorithm's function, explaining how it generates blocking angle ranges based on encountered tiles and how it determines visibility based on these ranges.
- The issue arises when the algorithm misinterprets the blocking angle when it crosses the 0/360-degree threshold, leading to incorrect visibility determinations.
- One participant mentions a temporary solution that divides the problem into two halves but expresses difficulty in finding a comprehensive solution online.
Areas of Agreement / Disagreement
Participants do not appear to reach a consensus on a definitive solution to the problem. There are multiple approaches suggested, but the discussion remains unresolved regarding the best method to handle the angle calculations.
Contextual Notes
The discussion highlights limitations in the current algorithm's handling of angles, particularly concerning the treatment of angles that wrap around the 0/360-degree point. There may be unresolved mathematical steps in determining the correct visibility based on blocking angles.