Skip to content

Viewer - decimal display fix - #9213

Merged
ev-mp merged 2 commits into
realsenseai:developmentfrom
remibettan:viewer-control-decimal-display-correction
Jun 15, 2021
Merged

Viewer - decimal display fix#9213
ev-mp merged 2 commits into
realsenseai:developmentfrom
remibettan:viewer-control-decimal-display-correction

Conversation

@remibettan

Copy link
Copy Markdown
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
Comment thread common/model-views.cpp Outdated
return res;
float f_0 = std::abs(f - (int)f);
std::string s = std::to_string(f_0);
return s.length() - 2;

@ev-mp ev-mp Jun 13, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

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 realsenseai: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