2011-02-08 2 views

답변

4

CLDC 1.1 사용할 수 있습니다 또는 다른 방법 사용할 수 있습니다

float value; 
int base; //base to round 

int round_down=(int)((int)(value/base))*base; 
int round_up=(int)((int)(value/base+0.5))*base; 
1

Math.ceil() or Math.floor() 아마 그러나 이들은 다시에만 :)