当前位置:网站首页>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
边栏推荐
- Docker install redis
- C语言初阶-指针详解-庖丁解牛篇
- [Fuhan 6630 encodes and stores videos, and uses RTSP server and timestamp synchronization to realize VLC viewing videos]
- How to implement append in tensor
- MySQL practice 45 [SQL query and update execution process]
- @Accessors注解作用指定前缀遵守驼峰命名
- Nasvit: neural architecture search of efficient visual converter with gradient conflict perception hypernetwork training
- How to make backgroundworker return an object
- BigVision代码
- labelme标记的文件转换为yolov5格式
猜你喜欢
MySQL practice 45 [SQL query and update execution process]
I2C subsystem (IV): I2C debug
Opengauss database development and debugging tool guide
The idea setting code is in UTF-8 idea Properties configuration file Chinese garbled
用docker 连接mysql的过程
MySQL practice 45 [global lock and table lock]
The idea cannot be loaded, and the market solution can be applied (pro test)
The process of connecting MySQL with docker
Practice of traffic recording and playback in vivo
Add automatic model generation function to hade
随机推荐
Super easy to use logzero
Hi3536C V100R001C02SPC040 交叉编译器安装
The idea cannot be loaded, and the market solution can be applied (pro test)
MySql实战45讲【索引】
Unity3d RPG implementation (medium)
Left connection, inner connection
[error record] the parameter 'can't have a value of' null 'because of its type, but the im
基于Qt的yolov5工程
MySQL practice 45 [SQL query and update execution process]
Tensorflow to pytorch notes; tf. gather_ Nd (x, y) to pytorch
C language beginner level - pointer explanation - paoding jieniu chapter
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?
PAT乙级“1104 天长地久”DFS优化思路
内存泄漏工具VLD安装及使用
LVGL使用心得
I2C 子系統(四):I2C debug
MySql实战45讲【SQL查询和更新执行流程】
一文带你了解 ZigBee
解决高並發下System.currentTimeMillis卡頓