KiCad PCB EDA Suite
SHAPE_LINE_CHAIN::compareOriginDistance Struct Reference

#include <shape_line_chain.h>

Public Member Functions

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

Public Attributes

VECTOR2I m_origin

Detailed Description

Definition at line 501 of file shape_line_chain.h.

Constructor & Destructor Documentation

◆ compareOriginDistance()

SHAPE_LINE_CHAIN::compareOriginDistance::compareOriginDistance ( const VECTOR2I aOrigin)

Definition at line 503 of file shape_line_chain.h.

503  :
504  m_origin( aOrigin )
505  {}

Member Function Documentation

◆ operator()()

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

Definition at line 507 of file shape_line_chain.h.

508  {
509  return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm();
510  }
double EuclideanNorm(const wxPoint &vector)
Euclidean norm of a 2D vector.
Definition: trigo.h:121

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

Member Data Documentation

◆ m_origin

VECTOR2I SHAPE_LINE_CHAIN::compareOriginDistance::m_origin

Definition at line 512 of file shape_line_chain.h.

Referenced by operator()().

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