use std::fabs to avoid conversion to double

This commit is contained in:
Garux
2025-11-01 19:08:32 +05:00
parent 43e2c423de
commit 17d6588d1a
45 changed files with 285 additions and 284 deletions
+2 -2
View File
@@ -45,10 +45,10 @@ public:
return other.m_indirect; //m_distance < other.m_distance;
}
else if( m_indirect && other.m_indirect ){
if( fabs( m_distance - other.m_distance ) > 1e-3f /*0.00002f*/ ){
if( std::fabs( m_distance - other.m_distance ) > 1e-3f /*0.00002f*/ ){
return m_distance < other.m_distance;
}
else if( fabs( m_depth - other.m_depth ) > 1e-6f ){
else if( std::fabs( m_depth - other.m_depth ) > 1e-6f ){
return m_depth < other.m_depth;
}
else{