我使用以下行將float轉換為int,但是它不如我所希望的那么準確: float a=8.61f; int b; b=(int)a;結果是:(8應該是9)當時a = -7.65f,結果為:(-7應該為-8)最好的方法是什么? 查看完整描述