KiCad PCB EDA Suite
compareOriginDistance Struct Reference

Public Member Functions

 compareOriginDistance (const VECTOR2I &aOrigin)
 
bool operator() (const SHAPE_LINE_CHAIN::INTERSECTION &aA, const SHAPE_LINE_CHAIN::INTERSECTION &aB) const
 

Public Attributes

VECTOR2I m_origin
 

Detailed Description

Definition at line 1346 of file shape_line_chain.cpp.

Constructor & Destructor Documentation

◆ compareOriginDistance()

compareOriginDistance::compareOriginDistance ( const VECTOR2I aOrigin)
inline

Definition at line 1348 of file shape_line_chain.cpp.

1348  :
1349  m_origin( aOrigin ) {};

Member Function Documentation

◆ operator()()

bool compareOriginDistance::operator() ( const SHAPE_LINE_CHAIN::INTERSECTION aA,
const SHAPE_LINE_CHAIN::INTERSECTION aB 
) const
inline

Definition at line 1351 of file shape_line_chain.cpp.

1353  {
1354  return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm();
1355  }
double EuclideanNorm(const wxPoint &vector)
Euclidean norm of a 2D vector.
Definition: trigo.h:146
VECTOR2I p
< Point of intersection between our and their.

References EuclideanNorm(), m_origin, and SHAPE_LINE_CHAIN::INTERSECTION::p.

Member Data Documentation

◆ m_origin

VECTOR2I compareOriginDistance::m_origin

Definition at line 1357 of file shape_line_chain.cpp.

Referenced by operator()().


The documentation for this struct was generated from the following file: