Improvement to intersection data calculation

This commit is contained in:
2026-05-01 14:46:30 +02:00
parent e475814c85
commit 2a3064b0fe
5 changed files with 70 additions and 11 deletions

View File

@@ -60,7 +60,7 @@ pub const Road = struct {
}
/// Checks whether pos coordinate is on the referenced road
pub fn isHighlighted(self: *const Road, pos: rl.Vector2) bool {
pub fn collides(self: *const Road, pos: rl.Vector2) bool {
return rl.checkCollisionPointLine(pos, self.nodes[0].pos, self.nodes[1].pos, c.ROAD_SIZE);
}
};