26 constexpr auto quad1(
const K& x1,
const K& z1,
const K& x2,
const K& z2) {
40 constexpr auto quad1(
const K& x1,
const K& z1,
const K& x2,
const K& z2) {
41 return sq(x1 / z1 - x2 / z2);
76 template <ProjectivePlaneCoord2 Po
int>
77 constexpr auto quadrance(
const Point& a1,
const Point& a2) {
78 return quad1(a1[0], a1[2], a2[0], a2[2]) +
quad1(a1[1], a1[2], a2[1], a2[2]);
88 template <
typename... Args>
constexpr auto quadrance_copy(
const Args&... args) {
89 return std::make_tuple(
quadrance(args.first, args.second)...);
109 template <ProjectivePlaneCoord2 Line,
typename T>
110 constexpr auto sbase(
const Line& l1,
const Line& l2,
const T& d) {
115 return (d * d) / (
dot1(l1, l1) *
dot1(l2, l2));
150 template <ProjectivePlaneCoord2 Line>
constexpr auto spread(
const Line& l1,
const Line& l2) {
161 template <ProjectivePlaneCoord2 Po
int>
163 const auto& [a_1, a_2, a_3] = triangle;
174 template <ProjectivePlaneCoord2 Line>
176 const auto& [a_1, a_2, a_3] = trilateral;
193 template <ProjectivePlaneCoord2 Line>
constexpr auto cross_s(
const Line& l1,
const Line& l2) {
Integral concept.
Definition common_concepts.h:84
Euclidean plane functions: perpendicularity, parallelism, altitude, orthocenter, etc.
Definition ck_concepts.hpp:11
constexpr auto quad1(const K &x1, const K &z1, const K &x2, const K &z2)
Compute squared difference of ratios (integral version).
Definition euclid_plane_measure.hpp:26
constexpr auto tri_quadrance(const Triple< Point > &triangle)
Compute the quadrances of a triangle's sides.
Definition euclid_plane_measure.hpp:162
typename T::value_type Value_type
Value type of a type.
Definition common_concepts.h:23
auto cross2(const std::array< _K, 3 > &v_a, const std::array< _K, 3 > &v_b) -> _K
3rd term of Cross product (xy-plane projection)
Definition pg_common.hpp:57
constexpr auto quadrance_copy(const Args &... args)
Compute quadrances for multiple pairs of points.
Definition euclid_plane_measure.hpp:88
constexpr auto tri_spread(const Triple< Line > &trilateral)
Compute the spreads of a triangle's angles.
Definition euclid_plane_measure.hpp:175
constexpr auto cross_s(const Line &l1, const Line &l2)
Compute the cross spread between two lines.
Definition euclid_plane_measure.hpp:193
constexpr auto sbase(const Line &l1, const Line &l2, const T &d)
Base function for spread and cross-spread.
Definition euclid_plane_measure.hpp:110
std::array< Point, 3 > Triple
Type alias for an array of three points (a triangle)
Definition proj_plane.hpp:58
constexpr auto quadrance(const Point &a1, const Point &a2)
Compute the quadrance between two points.
Definition euclid_plane_measure.hpp:77
auto dot1(const std::array< _K, 3 > &v_a, const std::array< _K, 3 > &v_b) -> _K
Dot product of the (x,y)-components of two vectors (affine part)
Definition pg_common.hpp:135
constexpr auto spread(const Line &l1, const Line &l2)
Compute the spread between two lines.
Definition euclid_plane_measure.hpp:150
constexpr auto sq(const T &a)
Square function.
Definition pg_common.hpp:164
Fraction.
Definition fractions.hpp:92