Casting the value that is between 0 and 1 to an int before multiplying it by 100 was not a sensible thing to be doing...