38 return static_cast<int>(
std::floor(scalar + 0.5));
46 return static_cast<double>(scalar);
51 template <
typename T,
int N>
54 for (
int n = 0; n < N; ++n) {
62 for (
int n = 0; n < 2; ++n) {
70 for (
int n = 0; n < 3; ++n) {
75 template <
typename T,
int N>
78 for (
int n = 0; n < N; ++n) r[n] = this->_vector[n] == other[n];
82 template <
typename T,
int N>
85 for (
int n = 0; n < N; ++n) r[n] = this->_vector[n] != other[n];
89 template <
typename T,
int N>
92 for (
int n = 0; n < N; ++n) r[n] = this->_vector[n] < other[n];
96 template <
typename T,
int N>
99 for (
int n = 0; n < N; ++n) r[n] = this->_vector[n] <= other[n];
103 template <
typename T,
int N>
106 for (
int n = 0; n < N; ++n) r[n] = this->_vector[n] > other[n];
110 template <
typename T,
int N>
113 for (
int n = 0; n < N; ++n) r[n] = this->_vector[n] >= other[n];
117 template <
typename T,
int N>
120 for (
int n = 0; n < N; ++n) result = utils::hashCombine(result, point[n]);
125 #define INSTANTIATE_TYPE_DIM(TYPE, DIM) \
126 template class PointBase<TYPE, DIM>; \
127 template class Point<TYPE, DIM>; \
128 template std::size_t hash_value(Point<TYPE, DIM> const &);
129 #define INSTANTIATE_DIM(DIM) \
130 INSTANTIATE_TYPE_DIM(int, DIM); \
131 INSTANTIATE_TYPE_DIM(double, DIM); \
132 template Point<int, DIM>::Point(Point<double, DIM> const &); \
133 template Point<double, DIM>::Point(Point<int, DIM> const &);
CoordinateExpr< N > ne(Point< T, N > const &other) const noexcept
CoordinateExpr< N > lt(Point< T, N > const &other) const noexcept
CoordinateExpr< N > le(Point< T, N > const &other) const noexcept
CoordinateExpr< N > ge(Point< T, N > const &other) const noexcept
CoordinateExpr< N > gt(Point< T, N > const &other) const noexcept
CoordinateExpr< N > eq(Point< T, N > const &other) const noexcept
A coordinate class intended to represent absolute positions.
Point(T val=static_cast< T >(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct a Point with all elements set to the same scalar value.
std::size_t hash_value(Extent< T, N > const &extent) noexcept
static double convert(U scalar)
static int convert(U scalar)