MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / formatValue

Function formatValue

examples/drivers/lis3dhball/main.js:89–95  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

87}, 17);
88
89function formatValue(value) {
90 if (!value)
91 return value;
92 if (value < 0)
93 return value.toFixed(3);
94 return "+" + value.toFixed(3);
95}
96
97function drawBar(label, value, x, y, width, height) {
98 const halfWidth = width >> 1;

Callers 1

drawBarFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected