Math.round()运算规则+0.5向下取整

package com.study.JavaBase;import org.junit.Test;/*** @Description Math.round(11.5)等于多少? Math.round(-11.5)等于多少?* @Date 2021/9/4 16:28* @Created by 折腾的小飞*/
public class RoundDemo {@Testpublic void test(){System.out.println(Math.floor(11.5)); //向下取整System.out.println(Math.floor(-11.5)); //向下取整System.out.println(Math.ceil(11.5)); // 向上取整System.out.println(Math.ceil(-11.5)); // 向上取整System.out.println(Math.round(11.5)); // 11.5+0.5 向下取整 12System.out.println(Math.round(-11.5)); // -11.5+0.5 向下取整 -11}
}

Math.round(11.5)等于多少? Math.round(-11.5)等于多少?相关推荐

  1. java面试题33 Math.round(11.5) 等于多少 (). Math.round(-11.5) 等于多少 ( ).

    java面试题33 Math.round(11.5) 等于多少 (). Math.round(-11.5) 等于多少 (  ). A 11 ,-11 B 11 ,-12 C 12 ,-11 D 12 ...

  2. java的round函数怎么用_Java Math round()用法及代码示例

    java.lang.Math.round()是内置数学函数,它返回最接近参数的long.通过将1/2相加,将结果四舍五入为整数,再加上1/2后取结果的下限,并将结果强制转换为long类型. 如果参数为 ...

  3. math.trunc_JavaScript中带有示例的Math.trunc()方法

    math.trunc JavaScript | Math.trunc()方法 (JavaScript | Math.trunc() Method) Math.trunc() is a function ...

  4. math.atan2_带有Python示例的math.atan2()方法

    math.atan2 Python math.atan2()方法 (Python math.atan2() method) math.atan2() method is a library metho ...

  5. math.asin_JavaScript中带有示例的Math.asin()方法

    math.asin JavaScript | Math.asin()方法 (JavaScript | Math.asin() Method) Math.asin() is a function in ...

  6. math.atan_JavaScript中带有示例的Math.atan()方法

    math.atan JavaScript | Math.atan()方法 (JavaScript | Math.atan() Method) Math.atan() is a function in ...

  7. math.atan_Python中带有示例的math.atan()方法

    math.atan Python math.atan()方法 (Python math.atan() method) math.atan() method is a library method of ...

  8. js math.hypot_带有Python示例的math.hypot()方法

    js math.hypot Python math.hypot()方法 (Python math.hypot() method) math.hypot() method is a library me ...

  9. math.trunc_带有Python示例的math.trunc()方法

    math.trunc Python math.trunc()方法 (Python math.trunc() method) math.trunc() method is a library metho ...

最新文章

  1. php swfupload handlers.js,swfupload使用代码说明
  2. matlab 区间预测,用神经网络进行预测的MATLAB算法实现?
  3. dlp防泄密系统卸载_浙江好用的企业图纸防泄密软件推荐,局域网内部图纸透明加密方案...
  4. DecimalFormat 保留精度或者是 小数 比较好用
  5. cdh 安装_CDH的介绍和部署
  6. 原: 安装VMtools过程流水帐
  7. 选择开发语言和学习的路径(这个标题可能有点不准确)
  8. 【实践案例】Databricks 数据洞察在美的暖通与楼宇的应用实践
  9. Java并发修改异常的源码解析
  10. python生成pdf文档_使用Python生成pdf文件
  11. 《人月神话》读书笔记2--空间技能
  12. jpGraph学习——绘制3D饼形图
  13. C++ 0x/11学习笔记
  14. Scala 快查手册
  15. 镁光闪存颗粒对照表_内存颗粒型号识别
  16. Android项目实践(二)——日记本APP
  17. 微信小程序傻瓜制作_微信小程序模板制作:手把手教你做一个生鲜小程序
  18. 小学五计算机课程安排,2021年小学五年级信息技术教学计划(干货4篇)
  19. C# GDI 手绘图片转化为电子版处理
  20. android listview适配器使用,android – 使用适配器在Listview中填充Listview

热门文章

  1. 贝叶斯统计的无信息先验和共轭先验
  2. 全基因组关联分析中上位性检测算法的研究
  3. linux默认文件大小,Linux 改变文件大小的方法
  4. ASP .NET Core Web MVC系列教程:使用ASP .NET Core创建MVC Web应用程序
  5. PAT甲级真题 1018 A+B in Hogwarts--python解法
  6. GO语言教程1:Windows环境下GO语言的安装与配置
  7. 2019年热销微型笔记本计算机排名,2019年笔记本销量排行_电脑品牌排名:2019笔记本电脑前十排行...
  8. c语言菱形花圃,一种便于自动修剪花圃的电锯支架的制作方法
  9. itest系统学生登录不了_四川省中小学生艺术测评管理系统登录平台https://www.soyohui.com/app/165187/...
  10. 【RocketMQ工作原理】订阅关系的一致性