~cern-kicad/kicad/kicad-pns-tom

« back to all changes in this revision

Viewing changes to pcbnew/class_zone.cpp

More int casts to rounding conversions

Show diffs side-by-side

added added

removed removed

Lines of Context:
540
540
            end_segm = tmp;                 // end_segm is the beginning of the current outline
541
541
        }
542
542
 
543
 
        /* test the dist between segment and ref point */
544
 
        int dist = (int) GetPointToLineSegmentDistance( refPos.x,
545
 
                                                        refPos.y,
546
 
                                                        m_Poly->m_CornersList[item_pos].x,
547
 
                                                        m_Poly->m_CornersList[item_pos].y,
548
 
                                                        m_Poly->m_CornersList[end_segm].x,
549
 
                                                        m_Poly->m_CornersList[end_segm].y );
 
543
        // test the dist between segment and ref point
 
544
        int dist = KiROUND( GetPointToLineSegmentDistance( 
 
545
                    refPos.x,
 
546
                    refPos.y,
 
547
                    m_Poly->m_CornersList[item_pos].x,
 
548
                    m_Poly->m_CornersList[item_pos].y,
 
549
                    m_Poly->m_CornersList[end_segm].x,
 
550
                    m_Poly->m_CornersList[end_segm].y ) );
550
551
 
551
552
        if( dist < min_dist )
552
553
        {