Skip to content

fix(geometry): add fast returns in triangle triangle distance#1306

Merged
BotellaA merged 2 commits into
nextfrom
fix/perf-distance
Jul 11, 2026
Merged

fix(geometry): add fast returns in triangle triangle distance#1306
BotellaA merged 2 commits into
nextfrom
fix/perf-distance

Conversation

@panquez

@panquez panquez commented Jul 10, 2026

Copy link
Copy Markdown
Member

No description provided.

@panquez panquez requested a review from BotellaA July 10, 2026 13:57
@github-actions

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 155 concern(s)
  • src/geode/geometry/distance.cpp:91:9: warning: [readability-use-std-min-max]

    use std::max instead of <=

       24 |         if( area2 <= 0 )
          |         ^~~~~~~~~~~~~~~~
          |         area2 = std::max<double>(area2, 0);
       25 |         {
          |         ~
       26 |             area2 = 0;
          |             ~~~~~~~~~~
       27 |         }
          |         ~
  • src/geode/geometry/distance.cpp:98:45: warning: [readability-identifier-length]

    parameter name 'b1' is too short, expected at least 3 characters

       98 |     void get_min_edge02( double a11, double b1, std::array< double, 2 >& p )
          |                                             ^
  • src/geode/geometry/distance.cpp:98:74: warning: [readability-identifier-length]

    parameter name 'p' is too short, expected at least 3 characters

       98 |     void get_min_edge02( double a11, double b1, std::array< double, 2 >& p )
          |                                                                          ^
  • src/geode/geometry/distance.cpp:115:10: warning: [readability-function-size]

    function 'get_min_edge12' exceeds recommended size/complexity thresholds

      115 |     void get_min_edge12( double a01,
          |          ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:115:10: note: 6 parameters (threshold 4)
  • src/geode/geometry/distance.cpp:115:26: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'get_min_edge12' of similar type ('double') are easily swapped by mistake

      115 |     void get_min_edge12( double a01,
          |                          ^~~~~~~~~~~
      116 |         double a11,
          |         ~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:115:33: note: the first parameter in the range is 'a01'
      115 |     void get_min_edge12( double a01,
          |                                 ^~~
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:116:16: note: the last parameter in the range is 'a11'
      116 |         double a11,
          |                ^~~
  • src/geode/geometry/distance.cpp:117:16: warning: [readability-identifier-length]

    parameter name 'b1' is too short, expected at least 3 characters

      117 |         double b1,
          |                ^
  • src/geode/geometry/distance.cpp:118:9: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'get_min_edge12' of similar type ('double') are easily swapped by mistake

      118 |         double f10,
          |         ^~~~~~~~~~~
      119 |         double f01,
          |         ~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:118:16: note: the first parameter in the range is 'f10'
      118 |         double f10,
          |                ^~~
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:119:16: note: the last parameter in the range is 'f01'
      119 |         double f01,
          |                ^~~
  • src/geode/geometry/distance.cpp:120:34: warning: [readability-identifier-length]

    parameter name 'p' is too short, expected at least 3 characters

      120 |         std::array< double, 2 >& p )
          |                                  ^
  • src/geode/geometry/distance.cpp:122:20: warning: [readability-identifier-length]

    variable name 'h0' is too short, expected at least 3 characters

      122 |         const auto h0 = a01 + b1 - f10;
          |                    ^
  • src/geode/geometry/distance.cpp:129:24: warning: [readability-identifier-length]

    variable name 'h1' is too short, expected at least 3 characters

      129 |             const auto h1 = a11 + b1 - f01;
          |                        ^
  • src/geode/geometry/distance.cpp:142:10: warning: [readability-function-size]

    function 'get_min_interior' exceeds recommended size/complexity thresholds

      142 |     void get_min_interior( const std::array< double, 2 >& p0,
          |          ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:142:10: note: 5 parameters (threshold 4)
  • src/geode/geometry/distance.cpp:142:59: warning: [readability-identifier-length]

    parameter name 'p0' is too short, expected at least 3 characters

      142 |     void get_min_interior( const std::array< double, 2 >& p0,
          |                                                           ^
  • src/geode/geometry/distance.cpp:143:16: warning: [readability-identifier-length]

    parameter name 'h0' is too short, expected at least 3 characters

      143 |         double h0,
          |                ^
  • src/geode/geometry/distance.cpp:144:40: warning: [readability-identifier-length]

    parameter name 'p1' is too short, expected at least 3 characters

      144 |         const std::array< double, 2 >& p1,
          |                                        ^
  • src/geode/geometry/distance.cpp:145:16: warning: [readability-identifier-length]

    parameter name 'h1' is too short, expected at least 3 characters

      145 |         double h1,
          |                ^
  • src/geode/geometry/distance.cpp:146:34: warning: [readability-identifier-length]

    parameter name 'p' is too short, expected at least 3 characters

      146 |         std::array< double, 2 >& p )
          |                                  ^
  • src/geode/geometry/distance.cpp:198:42: warning: [readability-function-cognitive-complexity]

    function 'pivot_point_triangle_distance' has cognitive complexity of 44 (threshold 10)

      198 |     std::tuple< double, geode::Point3D > pivot_point_triangle_distance(
          |                                          ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:203:33: note: +1, including nesting penalty of 0, nesting level increased to 1
      203 |         const auto v1 = v0 == 2 ? 0 : v0 + 1;
          |                                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:204:33: note: +1, including nesting penalty of 0, nesting level increased to 1
      204 |         const auto v2 = v1 == 2 ? 0 : v1 + 1;
          |                                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:222:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      222 |         if( f00 >= 0 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:224:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      224 |             if( f01 >= 0 )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:228:13: note: +1, nesting level increased to 2
      228 |             else
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:237:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      237 |                 if( h0 >= 0 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:241:17: note: +1, nesting level increased to 3
      241 |                 else
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:244:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      244 |                     if( h1 <= 0 )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:248:21: note: +1, nesting level increased to 4
      248 |                     else
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:255:14: note: +1, nesting level increased to 1
      255 |         else if( f01 <= 0 )
          |              ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:257:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      257 |             if( f10 <= 0 )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:262:13: note: +1, nesting level increased to 2
      262 |             else
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:270:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      270 |                 if( h0 >= 0 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:274:17: note: +1, nesting level increased to 3
      274 |                 else
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:277:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      277 |                     if( h1 <= 0 )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:281:21: note: +1, nesting level increased to 4
      281 |                     else
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:288:14: note: +1, nesting level increased to 1
      288 |         else if( f10 <= 0 )
          |              ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:298:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      298 |             if( h0 >= 0 )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:302:13: note: +1, nesting level increased to 2
      302 |             else
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:305:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      305 |                 if( h1 <= 0 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:309:17: note: +1, nesting level increased to 3
      309 |                 else
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:315:9: note: +1, nesting level increased to 1
      315 |         else
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:323:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      323 |             if( h0 >= 0 )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:327:13: note: +1, nesting level increased to 2
      327 |             else
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:330:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      330 |                 if( h1 <= 0 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:334:17: note: +1, nesting level increased to 3
      334 |                 else
          |                 ^
  • src/geode/geometry/distance.cpp:201:30: warning: [readability-identifier-length]

    parameter name 'v0' is too short, expected at least 3 characters

      201 |         geode::local_index_t v0 )
          |                              ^
  • src/geode/geometry/distance.cpp:203:20: warning: [readability-identifier-length]

    variable name 'v1' is too short, expected at least 3 characters

      203 |         const auto v1 = v0 == 2 ? 0 : v0 + 1;
          |                    ^
  • src/geode/geometry/distance.cpp:204:20: warning: [readability-identifier-length]

    variable name 'v2' is too short, expected at least 3 characters

      204 |         const auto v2 = v1 == 2 ? 0 : v1 + 1;
          |                    ^
  • src/geode/geometry/distance.cpp:212:20: warning: [readability-identifier-length]

    variable name 'b0' is too short, expected at least 3 characters

      212 |         const auto b0 = -diff.dot( edge0 );
          |                    ^
  • src/geode/geometry/distance.cpp:213:20: warning: [readability-identifier-length]

    variable name 'b1' is too short, expected at least 3 characters

      213 |         const auto b1 = -diff.dot( edge1 );
          |                    ^
  • src/geode/geometry/distance.cpp:219:9: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'p'

      219 |         std::array< double, 2 > p0, p1, p;
          |         ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:219:9: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'p0'

    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:219:9: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'p1'

    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:219:9: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

      219 |         std::array< double, 2 > p0, p1, p;
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/geometry/distance.cpp:219:33: warning: [readability-identifier-length]

    variable name 'p0' is too short, expected at least 3 characters

      219 |         std::array< double, 2 > p0, p1, p;
          |                                 ^
  • src/geode/geometry/distance.cpp:219:37: warning: [readability-identifier-length]

    variable name 'p1' is too short, expected at least 3 characters

      219 |         std::array< double, 2 > p0, p1, p;
          |                                     ^
  • src/geode/geometry/distance.cpp:220:9: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

      220 |         double dt1, h0, h1;
          |         ^~~~~~~~~~~~~~~~~~~
  • src/geode/geometry/distance.cpp:220:16: warning: [cppcoreguidelines-init-variables]

    variable 'dt1' is not initialized

      220 |         double dt1, h0, h1;
          |                ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:220:21: warning: [cppcoreguidelines-init-variables]

    variable 'h0' is not initialized

      220 |         double dt1, h0, h1;
          |                     ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:220:21: warning: [readability-identifier-length]

    variable name 'h0' is too short, expected at least 3 characters

  • src/geode/geometry/distance.cpp:220:25: warning: [cppcoreguidelines-init-variables]

    variable 'h1' is not initialized

      220 |         double dt1, h0, h1;
          |                         ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:220:25: warning: [readability-identifier-length]

    variable name 'h1' is too short, expected at least 3 characters

  • src/geode/geometry/distance.cpp:345:43: warning: [hicpp-move-const-arg]

    std::move of the variable 'closest_point' of the trivially-copyable type 'geode::Point3D' (aka 'Point<3>') has no effect; remove std::move()

      345 |         return std::make_tuple( distance, std::move( closest_point ) );
          |                                           ^~~~~~~~~~               ~
  • src/geode/geometry/distance.cpp:350:9: warning: [readability-function-cognitive-complexity]

    function 'find_non_colocated_triangles_points' has cognitive complexity of 11 (threshold 10)

      350 |         find_non_colocated_triangles_points( const geode::Triangle3D& triangle0,
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:358:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      358 |         for( const auto vertex0 : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:360:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      360 |             for( const auto vertex1 : geode::LRange{ 3 } )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:362:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      362 |                 if( geode::point_point_distance(
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:375:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      375 |         for( const auto v : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:377:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      377 |             if( !colocated.first[v] )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:381:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      381 |             if( !colocated.second[v] )
          |             ^
  • src/geode/geometry/distance.cpp:390:9: warning: [readability-function-cognitive-complexity]

    function 'test_triangle_non_common_edges' has cognitive complexity of 15 (threshold 10)

      390 |         test_triangle_non_common_edges(
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:401:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      401 |         for( const auto v0 : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:403:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      403 |             if( v0 == non_colocated0 )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:409:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      409 |             for( const auto v1 : geode::LRange{ 3 } )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:411:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      411 |                 if( v1 == non_colocated1 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:419:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      419 |                 if( cur_pt0.inexact_equal( vertices0[v0] )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:420:21: note: +1
      420 |                     || cur_pt1.inexact_equal( vertices1[v1] ) )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:424:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      424 |                 if( cur_distance < min_distance )
          |                 ^
  • src/geode/geometry/distance.cpp:401:25: warning: [readability-identifier-length]

    variable name 'v0' is too short, expected at least 3 characters

      401 |         for( const auto v0 : geode::LRange{ 3 } )
          |                         ^
  • src/geode/geometry/distance.cpp:409:29: warning: [readability-identifier-length]

    variable name 'v1' is too short, expected at least 3 characters

      409 |             for( const auto v1 : geode::LRange{ 3 } )
          |                             ^
  • src/geode/geometry/distance.cpp:435:58: warning: [readability-function-cognitive-complexity]

    function 'test_close_triangles' has cognitive complexity of 12 (threshold 10)

      435 |     std::tuple< double, geode::Point3D, geode::Point3D > test_close_triangles(
          |                                                          ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:444:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      444 |         for( const auto vertex0 : non_colocated_points )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:446:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      446 |             for( const auto vertex1 : non_colocated_points )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:448:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      448 |                 if( vertex0 == vertex1 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:452:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      452 |                 if( geode::point_point_distance( base_vertices[vertex0].get(),
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:469:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      469 |                 if( cur_distance < min_distance )
          |                 ^
  • src/geode/geometry/distance.cpp:484:9: warning: [readability-function-cognitive-complexity]

    function 'approximate_segment_segment_distance' has cognitive complexity of 99 (threshold 10)

      484 |         approximate_segment_segment_distance(
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:503:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      503 |         if( ac > bb )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:505:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      505 |             if( std::log2( std::abs( ac ) / std::abs( ac - bb ) ) > 20 )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:512:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      512 |             if( bte <= ctd ) // s <= 0
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:515:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      515 |                 if( e <= 0 ) // t <= 0
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:520:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      520 |                     if( nd >= a )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:524:26: note: +1, nesting level increased to 4
      524 |                     else if( nd > 0 )
          |                          ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:530:22: note: +1, nesting level increased to 3
      530 |                 else if( e < c ) // 0 < t < 1
          |                      ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:535:17: note: +1, nesting level increased to 3
      535 |                 else // t >= 1
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:540:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      540 |                     if( bmd >= a )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:544:26: note: +1, nesting level increased to 4
      544 |                     else if( bmd > 0 )
          |                          ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:551:13: note: +1, nesting level increased to 2
      551 |             else // s > 0
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:553:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      553 |                 if( std::log2( std::abs( bte ) / std::abs( bte - ctd ) ) > 20 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:558:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      558 |                 if( s >= det ) // s >= 1
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:563:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      563 |                     if( bpe <= 0 ) // t <= 0
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:568:25: note: +5, including nesting penalty of 4, nesting level increased to 5
      568 |                         if( nd <= 0 )
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:572:30: note: +1, nesting level increased to 5
      572 |                         else if( nd < a )
          |                              ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:578:26: note: +1, nesting level increased to 4
      578 |                     else if( bpe < c ) // 0 < t < 1
          |                          ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:583:21: note: +1, nesting level increased to 4
      583 |                     else // t >= 1
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:588:25: note: +5, including nesting penalty of 4, nesting level increased to 5
      588 |                         if( bmd <= 0 )
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:592:30: note: +1, nesting level increased to 5
      592 |                         else if( bmd < a )
          |                              ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:599:17: note: +1, nesting level increased to 3
      599 |                 else // 0 < s < 1
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:603:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      603 |                     if( ate <= btd ) // t <= 0
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:608:25: note: +5, including nesting penalty of 4, nesting level increased to 5
      608 |                         if( nd <= 0 )
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:612:30: note: +1, nesting level increased to 5
      612 |                         else if( nd >= a )
          |                              ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:616:25: note: +1, nesting level increased to 5
      616 |                         else
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:621:21: note: +1, nesting level increased to 4
      621 |                     else // t > 0
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:623:25: note: +5, including nesting penalty of 4, nesting level increased to 5
      623 |                         if( std::log2( std::abs( ate ) / std::abs( ate - btd ) )
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:629:25: note: +5, including nesting penalty of 4, nesting level increased to 5
      629 |                         if( t >= det ) // t >= 1
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:634:29: note: +6, including nesting penalty of 5, nesting level increased to 6
      634 |                             if( bmd <= 0 )
          |                             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:638:34: note: +1, nesting level increased to 6
      638 |                             else if( bmd >= a )
          |                                  ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:642:29: note: +1, nesting level increased to 6
      642 |                             else
          |                             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:647:25: note: +1, nesting level increased to 5
      647 |                         else // 0 < t < 1
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:657:9: note: +1, nesting level increased to 1
      657 |         else
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:677:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      677 |             if( e <= 0 ) // t <= 0
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:682:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      682 |                 if( nd <= 0 ) // s <= 0
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:687:22: note: +1, nesting level increased to 3
      687 |                 else if( nd >= a ) // s >= 1
          |                      ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:692:17: note: +1, nesting level increased to 3
      692 |                 else // 0 < s < 1
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:698:18: note: +1, nesting level increased to 2
      698 |             else if( e >= c ) // t >= 1
          |                  ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:703:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      703 |                 if( bmd <= 0 ) // s <= 0
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:708:22: note: +1, nesting level increased to 3
      708 |                 else if( bmd >= a ) // s >= 1
          |                      ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:713:17: note: +1, nesting level increased to 3
      713 |                 else // 0 < s < 1
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:719:13: note: +1, nesting level increased to 2
      719 |             else // 0 < t < 1
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:734:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      734 |         if( distance < geode::GLOBAL_EPSILON )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:741:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      741 |         if( distance_to_closest0 < geode::GLOBAL_EPSILON )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:748:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      748 |         if( distance_to_closest1 < geode::GLOBAL_EPSILON )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:754:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      754 |         if( distance_to_closest0 < distance )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:756:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      756 |             if( distance_to_closest1 < distance_to_closest0 )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/distance.cpp:765:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      765 |         if( distance_to_closest1 < distance )
          |         ^
  • src/geode/geometry/distance.cpp:491:20: warning: [readability-identifier-naming]

    invalid case style for variable 'P1mP0'

      491 |         const auto P1mP0 = segment0.direction();
          |                    ^~~~~
          |                    p1m_p0
      492 |         const auto Q1mQ0 = segment1.direction();
      493 |         const geode::Vector< dimension > P0mQ0{ segment1.vertices()[0],
      494 |             segment0.vertices()[0] };
      495 |         const auto a = P1mP0.dot( P1mP0 );
          |                        ~~~~~      ~~~~~
          |                        p1m_p0     p1m_p0
      496 |         const auto b = P1mP0.dot( Q1mQ0 );
          |                        ~~~~~
          |                        p1m_p0
      497 |         const auto c = Q1mQ0.dot( Q1mQ0 );
      498 |         const auto d = P1mP0.dot( P0mQ0 );
          |                        ~~~~~
          |                        p1m_p0
  • src/geode/geometry/distance.cpp:492:20: warning: [readability-identifier-naming]

    invalid case style for variable 'Q1mQ0'

      492 |         const auto Q1mQ0 = segment1.direction();
          |                    ^~~~~
          |                    q1m_q0
      493 |         const geode::Vector< dimension > P0mQ0{ segment1.vertices()[0],
      494 |             segment0.vertices()[0] };
      495 |         const auto a = P1mP0.dot( P1mP0 );
      496 |         const auto b = P1mP0.dot( Q1mQ0 );
          |                                   ~~~~~
          |                                   q1m_q0
      497 |         const auto c = Q1mQ0.dot( Q1mQ0 );
          |                        ~~~~~      ~~~~~
          |                        q1m_q0     q1m_q0
      498 |         const auto d = P1mP0.dot( P0mQ0 );
      499 |         const auto e = Q1mQ0.dot( P0mQ0 );
          |                        ~~~~~
          |                        q1m_q0
  • src/geode/geometry/distance.cpp:493:42: warning: [readability-identifier-naming]

    invalid case style for variable 'P0mQ0'

      493 |         const geode::Vector< dimension > P0mQ0{ segment1.vertices()[0],
          |                                          ^~~~~
          |                                          p0m_q0
      494 |             segment0.vertices()[0] };
      495 |         const auto a = P1mP0.dot( P1mP0 );
      496 |         const auto b = P1mP0.dot( Q1mQ0 );
      497 |         const auto c = Q1mQ0.dot( Q1mQ0 );
      498 |         const auto d = P1mP0.dot( P0mQ0 );
          |                                   ~~~~~
          |                                   p0m_q0
      499 |         const auto e = Q1mQ0.dot( P0mQ0 );
          |                                   ~~~~~
          |                                   p0m_q0
  • src/geode/geometry/distance.cpp:495:20: warning: [readability-identifier-length]

    variable name 'a' is too short, expected at least 3 characters

      495 |         const auto a = P1mP0.dot( P1mP0 );
          |                    ^
  • src/geode/geometry/distance.cpp:496:20: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      496 |         const auto b = P1mP0.dot( Q1mQ0 );
          |                    ^
  • src/geode/geometry/distance.cpp:497:20: warning: [readability-identifier-length]

    variable name 'c' is too short, expected at least 3 characters

      497 |         const auto c = Q1mQ0.dot( Q1mQ0 );
          |                    ^
  • src/geode/geometry/distance.cpp:500:20: warning: [readability-identifier-length]

    variable name 'ac' is too short, expected at least 3 characters

      500 |         const auto ac = a * c;
          |                    ^
  • src/geode/geometry/distance.cpp:501:20: warning: [readability-identifier-length]

    variable name 'bb' is too short, expected at least 3 characters

      501 |         const auto bb = b * b;
          |                    ^
  • src/geode/geometry/distance.cpp:502:9: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/geometry/distance.cpp:502:16: warning: [cppcoreguidelines-init-variables]

    variable 's' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:502:16: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

  • src/geode/geometry/distance.cpp:502:19: warning: [cppcoreguidelines-init-variables]

    variable 't' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                   ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:502:22: warning: [cppcoreguidelines-init-variables]

    variable 'nd' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                      ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:502:22: warning: [readability-identifier-length]

    variable name 'nd' is too short, expected at least 3 characters

  • src/geode/geometry/distance.cpp:502:26: warning: [cppcoreguidelines-init-variables]

    variable 'bmd' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                          ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:502:31: warning: [cppcoreguidelines-init-variables]

    variable 'bte' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                               ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:502:36: warning: [cppcoreguidelines-init-variables]

    variable 'ctd' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                                    ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:502:41: warning: [cppcoreguidelines-init-variables]

    variable 'bpe' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                                         ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:502:46: warning: [cppcoreguidelines-init-variables]

    variable 'ate' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                                              ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:502:51: warning: [cppcoreguidelines-init-variables]

    variable 'btd' is not initialized

      502 |         double s, t, nd, bmd, bte, ctd, bpe, ate, btd;
          |                                                   ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:505:69: warning: [cppcoreguidelines-avoid-magic-numbers]

    20 is a magic number; consider replacing it with a named constant

      505 |             if( std::log2( std::abs( ac ) / std::abs( ac - bb ) ) > 20 )
          |                                                                     ^
  • src/geode/geometry/distance.cpp:553:76: warning: [cppcoreguidelines-avoid-magic-numbers]

    20 is a magic number; consider replacing it with a named constant

      553 |                 if( std::log2( std::abs( bte ) / std::abs( bte - ctd ) ) > 20 )
          |                                                                            ^
  • src/geode/geometry/distance.cpp:624:31: warning: [cppcoreguidelines-avoid-magic-numbers]

    20 is a magic number; consider replacing it with a named constant

      624 |                             > 20 )
          |                               ^
  • src/geode/geometry/distance.cpp:729:44: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      729 |             segment0.vertices()[0].get() + P1mP0 * s;
          |                                            ^~~~~~~~~~
          |                                            (        )
  • src/geode/geometry/distance.cpp:731:44: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      731 |             segment1.vertices()[0].get() + Q1mQ0 * t;
          |                                            ^~~~~~~~~~
          |                                            (        )
  • src/geode/geometry/distance.cpp:799:33: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      799 |                 current_point + segment_direction * step;
          |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                                 (                       )
  • src/geode/geometry/distance.cpp:801:33: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '-'; add parentheses to explicitly specify the order of operations

      801 |                 current_point - segment_direction * step;
          |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                                 (                       )
  • src/geode/geometry/distance.cpp:895:20: warning: [readability-identifier-naming]

    invalid case style for variable 'segDirection'

      895 |         const auto segDirection = segment.direction();
          |                    ^~~~~~~~~~~~
          |                    seg_direction
      896 |         const Vector< dimension > diff{ segment.vertices()[0], line.origin() };
      897 |         const auto a00 = line.direction().dot( line.direction() );
      898 |         const auto a01 = -line.direction().dot( segDirection );
          |                                                 ~~~~~~~~~~~~
          |                                                 seg_direction
      899 |         const auto a11 = segDirection.dot( segDirection );
          |                          ~~~~~~~~~~~~      ~~~~~~~~~~~~
          |                          seg_direction     seg_direction
      900 |         const auto b0 = line.direction().dot( diff );
      901 |         const auto det = std::max( a00 * a11 - a01 * a01, 0. );
      902 |         double s0, s1;
      903 | 
      904 |         if( det > 0 )
      905 |         {
      906 |             // The line and segment are not parallel.
      907 |             const auto b1 = -segDirection.dot( diff );
          |                              ~~~~~~~~~~~~
          |                              seg_direction
  • src/geode/geometry/distance.cpp:900:20: warning: [readability-identifier-length]

    variable name 'b0' is too short, expected at least 3 characters

      900 |         const auto b0 = line.direction().dot( diff );
          |                    ^
  • src/geode/geometry/distance.cpp:901:36: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '-'; add parentheses to explicitly specify the order of operations

      901 |         const auto det = std::max( a00 * a11 - a01 * a01, 0. );
          |                                    ^~~~~~~~~
          |                                    (        )
  • src/geode/geometry/distance.cpp:901:48: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '-'; add parentheses to explicitly specify the order of operations

      901 |         const auto det = std::max( a00 * a11 - a01 * a01, 0. );
          |                                                ^~~~~~~~~~
          |                                                (        )
  • src/geode/geometry/distance.cpp:902:9: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

      902 |         double s0, s1;
          |         ^~~~~~~~~~~~~~
  • src/geode/geometry/distance.cpp:902:16: warning: [cppcoreguidelines-init-variables]

    variable 's0' is not initialized

      902 |         double s0, s1;
          |                ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:902:16: warning: [readability-identifier-length]

    variable name 's0' is too short, expected at least 3 characters

  • src/geode/geometry/distance.cpp:902:20: warning: [cppcoreguidelines-init-variables]

    variable 's1' is not initialized

      902 |         double s0, s1;
          |                    ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/geometry/distance.cpp:902:20: warning: [readability-identifier-length]

    variable name 's1' is too short, expected at least 3 characters

  • src/geode/geometry/distance.cpp:907:24: warning: [readability-identifier-length]

    variable name 'b1' is too short, expected at least 3 characters

      907 |             const auto b1 = -segDirection.dot( diff );
          |                        ^
  • src/geode/geometry/distance.cpp:944:48: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      944 |         auto closest_on_line = line.origin() + line.direction() * s0;
          |                                                ^~~~~~~~~~~~~~~~~~~~~~
          |                                                (                    )
  • src/geode/geometry/distance.cpp:946:43: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      946 |             segment.vertices()[0].get() + segDirection * s1;
          |                                           ^~~~~~~~~~~~~~~~~~
          |                                           (                )
  • src/geode/geometry/distance.cpp:1002:9: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'distance'

     1002 |         std::array< double, 3 > distance;
          |         ^                               
          |                                         {}
  • src/geode/geometry/distance.cpp:1012:16: warning: [cppcoreguidelines-init-variables]

    variable 'result' is not initialized

     1012 |         double result;
          |                ^     
          |                       = NAN
  • src/geode/geometry/distance.cpp:1065:24: warning: [readability-identifier-length]

    variable name 'E1' is too short, expected at least 3 characters

     1065 |         const Vector3D E1{ vertices[0], vertices[1] };
          |                        ^
  • src/geode/geometry/distance.cpp:1065:24: warning: [readability-identifier-naming]

    invalid case style for variable 'E1'

     1065 |         const Vector3D E1{ vertices[0], vertices[1] };
          |                        ^~
          |                        e1
     1066 |         const Vector3D E2{ vertices[0], vertices[2] };
     1067 |         const auto N = E1.cross( E2 );
          |                        ~~
          |                        e1
  • src/geode/geometry/distance.cpp:1066:24: warning: [readability-identifier-length]

    variable name 'E2' is too short, expected at least 3 characters

     1066 |         const Vector3D E2{ vertices[0], vertices[2] };
          |                        ^
  • src/geode/geometry/distance.cpp:1066:24: warning: [readability-identifier-naming]

    invalid case style for variable 'E2'

     1066 |         const Vector3D E2{ vertices[0], vertices[2] };
          |                        ^~
          |                        e2
     1067 |         const auto N = E1.cross( E2 );
          |                                  ~~
          |                                  e2
  • src/geode/geometry/distance.cpp:1067:20: warning: [readability-identifier-length]

    variable name 'N' is too short, expected at least 3 characters

     1067 |         const auto N = E1.cross( E2 );
          |                    ^
  • src/geode/geometry/distance.cpp:1067:20: warning: [readability-identifier-naming]

    invalid case style for variable 'N'

     1067 |         const auto N = E1.cross( E2 );
          |                    ^
          |                    n
     1068 |         const auto NdD = N.dot( line.direction() );
          |                          ~
          |                          n
     1069 |         if( std::fabs( NdD ) > 0 )
     1070 |         {
     1071 |             // The line and triangle are not parallel, so the line
     1072 |             // intersects the plane of the triangle at a point Y.
     1073 |             // Determine whether Y is contained by the triangle.
     1074 |             const Vector3D PmV0{ vertices[0], line.origin() };
     1075 |             const auto NdDiff = N.dot( PmV0 );
          |                                 ~
          |                                 n
  • src/geode/geometry/distance.cpp:1068:20: warning: [readability-identifier-naming]

    invalid case style for variable 'NdD'

     1068 |         const auto NdD = N.dot( line.direction() );
          |                    ^~~
          |                    nd_d
     1069 |         if( std::fabs( NdD ) > 0 )
          |                        ~~~
          |                        nd_d
     1070 |         {
     1071 |             // The line and triangle are not parallel, so the line
     1072 |             // intersects the plane of the triangle at a point Y.
     1073 |             // Determine whether Y is contained by the triangle.
     1074 |             const Vector3D PmV0{ vertices[0], line.origin() };
     1075 |             const auto NdDiff = N.dot( PmV0 );
     1076 |             const auto tIntersect = -NdDiff / NdD;
          |                                               ~~~
          |                                               nd_d
  • src/geode/geometry/distance.cpp:1074:28: warning: [readability-identifier-naming]

    invalid case style for variable 'PmV0'

     1074 |             const Vector3D PmV0{ vertices[0], line.origin() };
          |                            ^~~~
          |                            pm_v0
     1075 |             const auto NdDiff = N.dot( PmV0 );
          |                                        ~~~~
          |                                        pm_v0
  • src/geode/geometry/distance.cpp:1075:24: warning: [readability-identifier-naming]

    invalid case style for variable 'NdDiff'

     1075 |             const auto NdDiff = N.dot( PmV0 );
          |                        ^~~~~~
          |                        nd_diff
     1076 |             const auto tIntersect = -NdDiff / NdD;
          |                                      ~~~~~~
          |                                      nd_diff
  • src/geode/geometry/distance.cpp:1076:24: warning: [readability-identifier-naming]

    invalid case style for variable 'tIntersect'

     1076 |             const auto tIntersect = -NdDiff / NdD;
          |                        ^~~~~~~~~~
          |                        t_intersect
     1077 |             const auto Y = line.origin() + line.direction() * tIntersect;
          |                                                               ~~~~~~~~~~
          |                                                               t_intersect
  • src/geode/geometry/distance.cpp:1077:24: warning: [readability-identifier-length]

    variable name 'Y' is too short, expected at least 3 characters

     1077 |             const auto Y = line.origin() + line.direction() * tIntersect;
          |                        ^
  • src/geode/geometry/distance.cpp:1077:24: warning: [readability-identifier-naming]

    invalid case style for variable 'Y'

     1077 |             const auto Y = line.origin() + line.direction() * tIntersect;
          |                        ^
          |                        y
     1078 |             const Vector3D YmV0{ vertices[0], Y };
          |                                               ~
          |                                               y
  • src/geode/geometry/distance.cpp:1078:28: warning: [readability-identifier-naming]

    invalid case style for variable 'YmV0'

     1078 |             const Vector3D YmV0{ vertices[0], Y };
          |                            ^~~~
          |                            ym_v0
     1079 | 
     1080 |             // Compute the barycentric coordinates of the intersection.
     1081 |             const auto E1dE1 = E1.dot( E1 );
     1082 |             const auto E1dE2 = E1.dot( E2 );
     1083 |             const auto E2dE2 = E2.dot( E2 );
     1084 |             const auto E1dYmV0 = E1.dot( YmV0 );
          |                                          ~~~~
          |                                          ym_v0
     1085 |             const auto E2dYmV0 = E2.dot( YmV0 );
          |                                          ~~~~
          |                                          ym_v0
  • src/geode/geometry/distance.cpp:1081:24: warning: [readability-identifier-naming]

    invalid case style for variable 'E1dE1'

     1081 |             const auto E1dE1 = E1.dot( E1 );
          |                        ^~~~~
          |                        e1d_e1
     1082 |             const auto E1dE2 = E1.dot( E2 );
     1083 |             const auto E2dE2 = E2.dot( E2 );
     1084 |             const auto E1dYmV0 = E1.dot( YmV0 );
     1085 |             const auto E2dYmV0 = E2.dot( YmV0 );
     1086 |             const auto det = E1dE1 * E2dE2 - E1dE2 * E1dE2;
          |                              ~~~~~
          |                              e1d_e1
     1087 |             const auto b1 = ( E2dE2 * E1dYmV0 - E1dE2 * E2dYmV0 ) / det;
     1088 |             const auto b2 = ( E1dE1 * E2dYmV0 - E1dE2 * E1dYmV0 ) / det;
          |                               ~~~~~
          |                               e1d_e1
  • src/geode/geometry/distance.cpp:1082:24: warning: [readability-identifier-naming]

    invalid case style for variable 'E1dE2'

     1082 |             const auto E1dE2 = E1.dot( E2 );
          |                        ^~~~~
          |                        e1d_e2
     1083 |             const auto E2dE2 = E2.dot( E2 );
     1084 |             const auto E1dYmV0 = E1.dot( YmV0 );
     1085 |             const auto E2dYmV0 = E2.dot( YmV0 );
     1086 |             const auto det = E1dE1 * E2dE2 - E1dE2 * E1dE2;
          |                                              ~~~~~   ~~~~~
          |                                              e1d_e2  e1d_e2
     1087 |             const auto b1 = ( E2dE2 * E1dYmV0 - E1dE2 * E2dYmV0 ) / det;
          |                                                 ~~~~~
          |                                                 e1d_e2
     1088 |             const auto b2 = ( E1dE1 * E2dYmV0 - E1dE2 * E1dYmV0 ) / det;
          |                                                 ~~~~~
          |                                                 e1d_e2
  • src/geode/geometry/distance.cpp:1086:30: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '-'; add parentheses to explicitly specify the order of operations

     1086 |             const auto det = E1dE1 * E2dE2 - E1dE2 * E1dE2;
          |                              ^~~~~~~~~~~~~
          |                              (            )

Have any feedback or feature suggestions? Share it here.

@BotellaA BotellaA merged commit a70e50a into next Jul 11, 2026
19 checks passed
@BotellaA BotellaA deleted the fix/perf-distance branch July 11, 2026 08:59
@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 17.4.3-rc.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants