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

lib/display: D_show_conversions() %.1f to %g where values likely to be smaller than 0.0 #4263

Merged
merged 5 commits into from
Sep 2, 2024

Conversation

HamishB
Copy link
Contributor

@HamishB HamishB commented Aug 31, 2024

[display lib], along with minor debug message whitespace tweaks

Display pixels or raster region rows,cols are likely be on the order of 500, while projected map units are often in the millions, so pixels/meter factor can end up as a very small number. This patch edits an unused in the production code debug helper function to not round that division into a confusing 0.0, as well as some whitespace tweaks to make it more readable.

…e smaller than 0.0; whitespace tweaks

Display pixels or raster region rows,cols are likely be on the order of 500, while projected map units are often in the millions, so pixels/meter factor can end up as a very small number. This patch edits an unused in the production code debug helper function to not round that division into a confusing 0.0, as well as some whitespace tweaks to make it more readable.
@github-actions github-actions bot added C Related code is in C libraries display labels Aug 31, 2024
lib/display/cnversions.c Outdated Show resolved Hide resolved
@nilason
Copy link
Contributor

nilason commented Aug 31, 2024

@HamishB Please format the code with ClangFormat v18 (see https://github.com/OSGeo/grass/blob/main/doc/development/style_guide.md#c-and-c), the easiest and recommended way is by using pre-commit (see further down on the same link).

See also https://github.com/OSGeo/grass/blob/main/doc/development/github_guide.md#pr-title) regarding PR titel, in this case it should be prefixed with lib/display:.

@HamishB HamishB changed the title D_show_conversions(): %.1f to %g where values likely to be smaller than 0.0 lib/display: D_show_conversions() %.1f to %g where values likely to be smaller than 0.0 Aug 31, 2024
…e smaller than 0.0; whitespace tweaks

Display pixels or raster region rows,cols are likely be on the order of 500, while projected map units are often in the millions, so pixels/meter factor can end up as a very small number. This patch edits an unused in the production code debug helper function to not round that division into a confusing 0.0, as well as some whitespace tweaks to make it more readable.
@nilason nilason added this to the 8.5.0 milestone Sep 1, 2024
@nilason nilason merged commit 95807d0 into OSGeo:main Sep 2, 2024
26 checks passed
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Sep 5, 2024
…e smaller than 0.0 (OSGeo#4263)

Display pixels or raster region rows,cols are likely be on the order of 500, while projected map units are often in the millions, so pixels/meter factor can end up as a very small number. This patch edits an unused in the production code debug helper function to not round that division into a confusing 0.0, as well as some whitespace tweaks to make it more readable.
Mahesh1998 pushed a commit to Mahesh1998/grass that referenced this pull request Sep 19, 2024
…e smaller than 0.0 (OSGeo#4263)

Display pixels or raster region rows,cols are likely be on the order of 500, while projected map units are often in the millions, so pixels/meter factor can end up as a very small number. This patch edits an unused in the production code debug helper function to not round that division into a confusing 0.0, as well as some whitespace tweaks to make it more readable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C display libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants