当前位置:网站首页>float与0比较
float与0比较
2022-07-03 03:11:00 【qq_40247880】
代码,运行结果
if (mSetting)
mpLocalMapper->mThFarPoints = mSetting->thFarPoints();
else
mpLocalMapper->mThFarPoints = fsSettings["thFarPoints"];
// ? 这里有个疑问,C++中浮点型跟0比较是否用精确?
if (mpLocalMapper->mThFarPoints != 0) {
cout << "Discard points further than " << mpLocalMapper->mThFarPoints << " m from current camera" << endl;
mpLocalMapper->mbFarPoints = true;
} else{
mpLocalMapper->mbFarPoints = false;
cout << "Compare points further than " << mpLocalMapper->mThFarPoints << " m from current camera" << endl;
}
结果
Compare points further than 0 m from current camera
边栏推荐
- Segmentation fault occurs during VFORK execution
- I2C subsystem (III): I2C driver
- 力扣------网格中的最小路径代价
- docker安装mysql
- [combinatorics] Application of exponential generating function (multiple set arrangement problem | different balls in different boxes | derivation of exponential generating function of odd / even sequ
- js根据树结构查找某个节点的下面的所有父节点或者子节点
- ComponentScan和ComponentScans的区别
- Why does thread crash not cause JVM crash
- 后管中编辑与预览获取表单的值写法
- Pytorch配置
猜你喜欢
Vs Code configure virtual environment
内存泄漏工具VLD安装及使用
VS code配置虚拟环境
MySql實戰45講【SQL查詢和更新執行流程】
Deep reinforcement learning for intelligent transportation systems: a survey paper reading notes
分布式事务
Sqlserver row to column pivot
迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
Vs 2019 configuration du moteur de génération de tensorrt
vfork执行时出现Segmentation fault
随机推荐
Idea set method call ignore case
Le processus de connexion mysql avec docker
Agile certification (professional scrum Master) simulation exercises
Opengauss database development and debugging tool guide
45 lectures on MySQL [index]
VS 2019 配置tensorRT生成engine
How do you adjust the scope of activerecord Association in rails 3- How do you scope ActiveRecord associations in Rails 3?
Sous - système I2C (IV): débogage I2C
函数栈帧的创建与销毁
docker安装redis
Super easy to use logzero
I2C 子系统(一):I2C spec
PAT乙级常用函数用法总结
Hi3536C V100R001C02SPC040 交叉编译器安装
MySql实战45讲【索引】
Practice of traffic recording and playback in vivo
TCP 三次握手和四次挥手机制,TCP为什么要三次握手和四次挥手,TCP 连接建立失败处理机制
Cron表达式介绍
How to limit the size of the dictionary- How to limit the size of a dictionary?
文件重命名