Math类常用方法:
Math.sqrt()//计算平方根
Math.cbrt()//计算立方根
Math.hypot(x,y)//计算 (x的平方+y的平方)的平方根
Math.pow(a,b)//计算a的b次方
Math.exp(x)//计算e^x的值
Math.max();//计算最大值
Math.min();//计算最小值
Math.abs求绝对值
Math.ceil天花板的意思,就是返回大的值
Math.floor地板的意思,就是返回小的值
Math.random 取得一个大于或者等于0.0小于不等于1.0的随机数[0,1)
Math.rint 四舍五入,返回double值
Math.round 四舍五入,float时返回int值,double时返回long值
Math.nextUp(a) 返回比a大一点点的浮点数
Math.nextDown(a) 返回比a小一点点的浮点数
Math.nextAfter(a,b) 返回(a,b)或(b,a)间与a相邻的浮点数 b可以比a小
JSON 数据的书写格式:
并列的数据之间用逗号(", ")分隔。
映射用冒号(": ")表示。
并列数据的集合(数组)用方括号("[]")表示。
映射的集合(对象)用大括号("{}")表示。
[{" key " : " value " , " key " : " value " } , { " key " : " value " , "key " : " value " }]
{" key ": value ," key ":" value ","data":[{" key ": value ," key ":" value "},{" key ": value ," key ":" value "}]}