KiCad PCB EDA Suite
Loading...
Searching...
No Matches
seg.cpp File Reference
#include <algorithm>
#include <geometry/seg.h>
#include <math/util.h>
#include <math/vector2d.h>
#include <trigo.h>

Go to the source code of this file.

Functions

template<typename T >
int sgn (T aVal)
 
template<typename T >
constexpr T sqrt_helper (T x, T lo, T hi)
 
template<typename T >
constexpr T ct_sqrt (T x)
 
template<typename T >
isqrt (T x)
 

Variables

template<typename T >
static constexpr T sqrt_max_typed = ct_sqrt( std::numeric_limits<T>::max() )
 

Function Documentation

◆ ct_sqrt()

template<typename T >
constexpr T ct_sqrt ( x)
constexpr

Definition at line 52 of file seg.cpp.

◆ isqrt()

template<typename T >
T isqrt ( x)

Definition at line 61 of file seg.cpp.

Referenced by SEG::Collide(), SEG::Distance(), and SEG::LineDistance().

◆ sgn()

template<typename T >
int sgn ( aVal)

Definition at line 33 of file seg.cpp.

Referenced by SEG::LineDistance(), and SEG::mutualDistanceSquared().

◆ sqrt_helper()

template<typename T >
constexpr T sqrt_helper ( x,
lo,
hi 
)
constexpr

Definition at line 39 of file seg.cpp.

References sqrt_helper().

Referenced by sqrt_helper().

Variable Documentation

◆ sqrt_max_typed

template<typename T >
constexpr T sqrt_max_typed = ct_sqrt( std::numeric_limits<T>::max() )
staticconstexpr

Definition at line 58 of file seg.cpp.