Hey guys. I am working on a numeric keypad which needs to handle decimal values. I am having some trouble handling decimal values in the range: [-1, 0, 1]. It would seem that when I convert a string of say 0. or 0.0 into a double the toDouble() function always spits out 0. This code works for values greater than 1 or less than -1:
1 2 3 4 5 6 7 8 9 10 11 12 13
case Decimal:
{
if (m_maxDecimalDigits > 0)
{
digit = locale.decimalPoint();
if (!value.contains(digit))
{
value.append(digit);
}
}
break;
}
Is there some way I can get the toDouble() method to convert a string of say: "0.0" into a number with a decimal such as 0.0?