Skip to content

fixed normalization#221

Merged
petesramek merged 3 commits intodevelop/1.0from
bugfix/incorrect-normalization
Apr 5, 2026
Merged

fixed normalization#221
petesramek merged 3 commits intodevelop/1.0from
bugfix/incorrect-normalization

Conversation

@petesramek
Copy link
Copy Markdown
Owner

@petesramek petesramek commented Apr 5, 2026

This pull request makes a small update to the Normalize method in PolylineEncoding.cs to improve floating-point rounding accuracy. The change introduces a tiny epsilon adjustment to ensure more reliable normalization of values, especially for edge cases near rounding boundaries.

  • Improved floating-point normalization in the Normalize method by adding a small epsilon (1e-9) multiplied by the sign of the value, which helps avoid rounding errors when converting doubles to integers. (src/PolylineAlgorithm/PolylineEncoding.cs, src/PolylineAlgorithm/PolylineEncoding.csR79-L82)

@petesramek petesramek enabled auto-merge (squash) April 5, 2026 15:12
@petesramek petesramek merged commit f93fc21 into develop/1.0 Apr 5, 2026
16 checks passed
@petesramek petesramek deleted the bugfix/incorrect-normalization branch April 13, 2026 18:02
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