|
KiCad PCB EDA Suite
|
#include <algorithm>#include <limits>#include <iostream>#include <sstream>#include <type_traits>#include <math/util.h>Go to the source code of this file.
Classes | |
| struct | VECTOR2_TRAITS< T > |
| Traits class for VECTOR2. More... | |
| struct | VECTOR2_TRAITS< int > |
| class | VECTOR2< T > |
| Define a general 2D-vector/point. More... | |
| struct | std::hash< VECTOR2I > |
| struct | std::less< VECTOR2I > |
Namespaces | |
| namespace | std |
| STL namespace. | |
Typedefs | |
| typedef VECTOR2< double > | VECTOR2D |
| typedef VECTOR2< int32_t > | VECTOR2I |
| typedef VECTOR2< int64_t > | VECTOR2L |
Functions | |
| template<class T> | |
| std::ostream & | operator<< (std::ostream &aStream, const VECTOR2< T > &aVector) |
| template<class T, class U> | |
| constexpr VECTOR2< std::common_type_t< T, U > > | operator+ (const VECTOR2< T > &aLHS, const VECTOR2< U > &aRHS) |
| template<FloatingPoint T, class U> | |
| constexpr VECTOR2< T > | operator+ (const VECTOR2< T > &aLHS, const U &aScalar) |
| template<class T, class U> | |
| constexpr VECTOR2< std::common_type_t< T, U > > | operator- (const VECTOR2< T > &aLHS, const VECTOR2< U > &aRHS) |
| template<FloatingPoint T, class U> | |
| constexpr VECTOR2< T > | operator- (const VECTOR2< T > &aLHS, U aScalar) |
| template<Integral T, FloatingPoint U> | |
| constexpr VECTOR2< T > | operator- (const VECTOR2< T > &aLHS, const U &aScalar) |
| template<class T, class U> | |
| constexpr auto | operator* (const VECTOR2< T > &aLHS, const VECTOR2< U > &aRHS) |
| template<class T, class U> | |
| constexpr VECTOR2< std::common_type_t< T, U > > | operator* (const VECTOR2< T > &aLHS, const U &aScalar) |
| template<class T, class U> | |
| constexpr VECTOR2< std::common_type_t< T, U > > | operator* (const T &aScalar, const VECTOR2< U > &aVector) |
| template<class T> | |
| constexpr const VECTOR2< T > & | LexicographicalMax (const VECTOR2< T > &aA, const VECTOR2< T > &aB) |
| template<class T> | |
| constexpr const VECTOR2< T > & | LexicographicalMin (const VECTOR2< T > &aA, const VECTOR2< T > &aB) |
| template<class T> | |
| constexpr int | LexicographicalCompare (const VECTOR2< T > &aA, const VECTOR2< T > &aB) |
| template<class T> | |
| std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type | equals (VECTOR2< T > const &aFirst, VECTOR2< T > const &aSecond, T aEpsilon=std::numeric_limits< T >::epsilon()) |
| Template to compare two VECTOR2<T> values for equality within a required epsilon. | |
| constexpr VECTOR2I | KiROUND (const VECTOR2D &vec) |
Definition at line 694 of file vector2d.h.
Definition at line 695 of file vector2d.h.
Definition at line 696 of file vector2d.h.
| std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type equals | ( | VECTOR2< T > const & | aFirst, |
| VECTOR2< T > const & | aSecond, | ||
| T | aEpsilon = std::numeric_limits<T>::epsilon() ) |
Template to compare two VECTOR2<T> values for equality within a required epsilon.
Not constexpr until C++23 (without forgoing std::abs in equals)
| aFirst | value to compare. |
| aSecond | value to compare. |
| aEpsilon | allowed error. |
Definition at line 674 of file vector2d.h.
References equals(), T, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by equals().
Definition at line 699 of file vector2d.h.
References KiROUND(), KiROUND(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by VECTOR2< T >::EuclideanNorm(), KiROUND(), operator-(), VECTOR2< T >::operator/(), and VECTOR2< T >::Resize().
|
constexpr |
Definition at line 644 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE(), checkSelfIntersections(), DoOvalPointTestChecks(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), CADSTAR_SCH_ARCHIVE_LOADER::fixUpLibraryPins(), and KIGEOM::NormalisedSeg().
|
constexpr |
Definition at line 620 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
|
constexpr |
Definition at line 632 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE().
|
constexpr |
Definition at line 529 of file vector2d.h.
References T, VECTOR2< T >::x, and VECTOR2< T >::y.
|
constexpr |
Definition at line 522 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
|
constexpr |
Definition at line 513 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
|
constexpr |
Definition at line 449 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
|
constexpr |
Definition at line 441 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
|
constexpr |
Definition at line 495 of file vector2d.h.
References KiROUND(), KiROUND(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
constexpr |
Definition at line 472 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
|
constexpr |
Definition at line 480 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.
| std::ostream & operator<< | ( | std::ostream & | aStream, |
| const VECTOR2< T > & | aVector ) |
Definition at line 687 of file vector2d.h.
References VECTOR2< T >::x, and VECTOR2< T >::y.