Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop rounding *BL points #3864

Merged

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Mar 14, 2023

Identify the Bug or Feature request

Addresses #3763

Description of the Change

Closed polygon shapes passed to setToken*BL() or draw*BL() were reading the point coordinates as integers, ignoring any fractional parts (this did not apply to unclosed "polygons"). This change combines the closed/unclosed cases into one case and reads the coordinates as doubles.

On the getToken*BL()/get*BL() side, the coordinates of the returned polygon were being truncated after the hundredth place. This truncation is now removed so that the functions returns as values that are as precise as possible.

Possible Drawbacks

The results of getToken*BL()/get*BL() will generally be much longer due to the new precision. This could have performance implications in extreme cases, in particular if the results are operated on as strings. The results are also less readable if they need to be inspected by a human.

Documentation Notes

I don't think it's worth adding documentation as this is just a precision change.

Release Notes

  • Fixed a bug where setTokenVBL(), drawVBL() and related functions were truncating fractional coordinates.

This change is Reviewable

Copy link
Contributor

@Phergus Phergus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @kwvanderlinde)

@Phergus Phergus merged commit 471b084 into RPTools:develop Mar 16, 2023
@kwvanderlinde kwvanderlinde deleted the bugfix/3763-topology-point-rounding branch March 16, 2023 23:49
@cwisniew cwisniew added the bug label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants