Android笔记
——其他 【若对该知识点有更多想了解的,欢迎私信博主~~】
Math类:
Math.PI 返回记录的圆周率
Math.E 返回记录e的常量
Math.abs 返回绝对值
Math.sin 返回正弦函数 Math.asin 反正弦函数
Math.cos 返回余弦函数 Math.acos 反余弦函数
Math.tan 返回正切函数 Math.atan 反正切函数 Math.atan2 商的反正切函数
Math.toDegrees 返回 弧度转化为角度 Math.toRadians 角度转化为弧度
Math.ceil 返回不小于某数的最大整数
Math.floor 返回不大于某数的最大整数
Math.exp 返回e的任意次方
Math.log10 返回以10为底的对数
Math.log 返回自然对数
Math.rint 返回距离某数最近的整数
Math.round 四舍五入 返回int型或者long型(上一个函数返回double型)
Math.random 返回0,1之间的一个随机数
Math.IEEEremainder(x,y) 返x%y的值
Math.max 返回两数中最大
Math.min 返回两数中最小
Math.sqrt 返回开方
Math.pow 返回某数的任意次方