Simple question, but I can't seem to find an answer. If I am trying to display a battery voltage, for example, a difference of a few decimal points can be very important. If I have this:
stringFromNumber(voltage) + 'V'
and voltage is 12.4, it will output 12V. This is no good. I could quite easily fix this by editing the resultant StyleKit, but I would have to do that every time I made a change, which would be a real pain. Does anyone have a solution?
I am working with the C# output, but the problem exists with both C# and Objective-C.
Relevant Code:
In PaintCode I have a Voltage String expression of stringFromNumber(voltage) + 'V'
which generates:
private void DrawGuage(float voltage) {
...
var voltageString = new NSString(Math.Round(voltage).ToString()) + "V";
...
I want PaintCode to generate the same, but without the Math.round
.