Bug 367628 - Add option to round the display of numbers in a text box
Summary: Add option to round the display of numbers in a text box
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: equations (show other bugs)
Version: 2.0.8
Platform: unspecified Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-21 05:54 UTC by Ben Lewis
Modified: 2024-10-17 22:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Lewis 2016-08-21 05:54:27 UTC
I would like the ability to round the display of numbers in a text box. For example:

INPUT
--------
[GYRO1:Mean(X4)]
[=ROUND([GYRO1:Mean(X4)],0)]
[=ROUND([GYRO1:Mean(X4)],1)]
[=ROUND([GYRO1:Mean(X4)],-1)]
[=ROUND([GYRO1:Mean(X4)],-4)]

OUTPUT
-----------
1234.567
1235
1234.6
1230
0

I'm not sure what the appropriate output to [=ROUND([GYRO1:Mean(X4)],5)] is? Should it be 1234.567 OR 1234.56700?

Alternatively, the LaTeX library /nprounddigits could be implemented. For example:

INPUT
--------
[GYRO1:Mean(X4)]
\nprounddigits{1}
[GYRO1:Mean(X4)]

OUTPUT
------------
1234.567
1234.6


Reproducible: Didn't try
Comment 1 Netterfield 2024-10-17 22:01:17 UTC
Fixed for a while:
eg, [GYRO1:Mean(X4)]{%0.1f}
See the Help button in the label dialog.