Math.Celing、Math.Floor、Math.DivRem与Math.BigMul

返回大于或等于指定数字的最小整数。例如:

double a=Math.Celing(0.00);  //0

double a=Math.Celing(0.40);  //1

double a=Math.Celing(0.60);  //1

double a=Math.Celing(1.00);  //1

double a=Math.Celing(1.10);  //2

 

返回小于或等于指定数字的最大整数。例如:

double g=Math.Floor(1.00);   //1

double k=Math.Floor(1.90);   //1

double l=Math.Floor(2.00);   //1

double m=Math.Floor(2.10);   //1

 

返回两个32位有符号整数的商,并将余数作为输出参数传递。例如:

int ys;

double s=Math.DivRem(5,3,out ys);  //s=1;ys=2

 

生成两个32位数字的完整乘积。例如:

long cj=Math.BigMul(2,3);  //6

posted @ 2017-12-31 10:33  BloggerSb  阅读(491)  评论(0编辑  收藏  举报