DoubleFormatter
Constructor
DoubleFormatter <id> (double init_val, int num_decimal)
Action
Formats a double value into a string with the specified number of digits after the dot.Predefined children
- DoubleProperty:
input
. - IntProperty:
decimal
. - TextProperty:
output
.
Example
use core
use base
use display
use gui
_main_
Component root {
Frame f ("myFrame", 0, 0, 500, 500)
DoubleFormatter df (0, 2)
f.width / f.height => df.input
TextPrinter log
df.output => log.input
}