double halfWidth = Width / 2; double halfHeight = Height / 2;
当它们被除以2时,它们将是整数或小数.如何检查它们是整数还是.5?
modf
double intpart; if( modf( halfWidth,&intpart) == 0 ) { // your code here }