I’m trying to check the length, in digits, of a float variable, but I don’t know the correct syntax to use. I’ve looked this up and I couldn’t find an answer.
My code is a simple if statement:
if (currentNumber.digits < 3) { //If the number has less that three digits, I don't know what to put here to get it working
//code
}
The extra logic for negative numbers is left as an exercise to the reader.