Skip to content

Viewer - decimal display fix #9213

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

Conversation

remibettan
Copy link
Contributor

No description provided.

@remibettan remibettan changed the title correcting num of decimal digits and out of bounds message for cm Viewer - decimal display fix Jun 13, 2021
return res;
float f_0 = std::abs(f - (int)f);
std::string s = std::to_string(f_0);
return s.length() - 2;
Copy link
Collaborator

@ev-mp ev-mp Jun 13, 2021

Choose a reason for hiding this comment

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

Check for case of 1/0 decimal digits - the return value shall be non-negative
Switch to fabs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

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

Looks better

@ev-mp ev-mp merged commit 9eb1d18 into IntelRealSense:development Jun 15, 2021
@remibettan remibettan deleted the viewer-control-decimal-display-correction branch July 29, 2025 14:13
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.

2 participants