Simple math doing my head in - when is an int treated like an int?