Skip to content

Fixes Unit.is_facing#245

Open
maxnus wants to merge 2 commits intoBurnySc2:developfrom
maxnus:fix-is_facing
Open

Fixes Unit.is_facing#245
maxnus wants to merge 2 commits intoBurnySc2:developfrom
maxnus:fix-is_facing

Conversation

@maxnus
Copy link
Copy Markdown
Contributor

@maxnus maxnus commented Apr 25, 2026

Unit.is_facing does not wrap correctly at angles close to 0.

Example: angle = $0.001$, self.facing = $2\pi - 0.001$. The angle difference should be $0.002$, but the function would see $|-2\pi + 0.002|$.

I broadened the type hint of other_unit to also include Point2, but didn't change the name, since this could be breaking.

I also removed the TODO comment, I don't think we should make decisions like this in the low-level API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant