muu/line_segment.h file

Contains the definition of muu::line_segment.

Namespaces

namespace muu
The root namespace for all muu functions and types.

Classes

template <typename Scalar>
struct muu::line_segment
A line segment.
template <typename Scalar>
struct std::tuple_size<muu::line_segment<Scalar>>
Specialization of std::tuple_size for muu::line_segment.
template <size_t P, typename Scalar>
struct std::tuple_element<P, muu::line_segment<Scalar>>
Specialization of std::tuple_element for muu::line_segment.
template <typename Scalar>
struct muu::constants<line_segment<Scalar>>
Line segment constants.

Functions

template <typename S, typename T>
auto approx_equal(const line_segment<S>& seg1, const line_segment<T>& seg2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
Returns true if two line segments are approximately equal.
template <typename S>
auto approx_zero(const line_segment<S>& seg, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the points in line segment are approximately equal to zero.
template <typename S>
auto degenerate(const line_segment<S>& seg) -> bool constexpr noexcept
Returns true if a line segment is degenerate (i.e. its points are coincident).
template <typename S>
auto infinity_or_nan(const line_segment<S>& seg) -> bool constexpr noexcept
Returns true if any of the points in a line segment are infinity or NaN.