Skip to content

Commit f6ba198

Browse files
author
henrykotze
committed
Use numerical limits to query precision of types
Signed-off-by: henrykotze <henry@flycloudline.com>
1 parent 2d3611e commit f6ba198

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/systems/lighter_than_air_dynamics/LighterThanAirDynamics.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "gz/transport/Node.hh"
4646

4747
#include <mutex>
48+
#include <limits>
4849

4950
#include "LighterThanAirDynamics.hh"
5051

@@ -418,7 +419,7 @@ void LighterThanAirDynamics::PreUpdate(
418419
double visc_normal_y_ = 0.0;
419420
double visc_normal_z_ = 0.0;
420421

421-
if(visc_normal_mag_ > __DBL_EPSILON__){
422+
if(visc_normal_mag_ > std::numeric_limits<double>::epsilon()){
422423

423424
visc_normal_y_ = vel_eps_v[1]/visc_normal_mag_;
424425
visc_normal_z_ = vel_eps_v[2]/visc_normal_mag_;

0 commit comments

Comments
 (0)