12#ifndef EBGEOMETRY_VEC_HPP
13#define EBGEOMETRY_VEC_HPP
39 static_assert(std::is_floating_point_v<T>,
"Vec2T<T>: T must be a floating-point type");
227 static_assert(std::is_floating_point_v<T>,
"Vec3T<T>: T must be a floating-point type");
238 os <<
'(' <<
vec[0] <<
',' <<
vec[1] <<
',' <<
vec[2] <<
')';
558 std::array<T, 3> m_X;
731#include "EBGeometry_VecImplem.hpp"
Utility macros for EBGeometry.
Two-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:37
constexpr T dot(const Vec2T &a_other) const noexcept
Dot product.
T y
Second component in the vector.
Definition EBGeometry_Vec.hpp:73
static constexpr Vec2T< T > infinity() noexcept
Return a vector with infinite components.
T x
First component in the vector.
Definition EBGeometry_Vec.hpp:68
static constexpr Vec2T< T > zeros() noexcept
Return av vector with x = y = 0.
constexpr T length2() const noexcept
Compute square of vector.
static constexpr Vec2T< T > min() noexcept
Return the most-negative representable vector.
constexpr T length() const noexcept
Compute length of vector.
static constexpr Vec2T< T > max() noexcept
Return the most-positive representable vector.
constexpr Vec2T() noexcept
Default constructor. Sets the vector to the zero vector.
static constexpr Vec2T< T > ones() noexcept
Return a vector with x = y = 1.
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:225
constexpr Vec3T() noexcept
Default constructor. Sets the vector to the zero vector.
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31
constexpr Vec3T< T > clamp(const Vec3T< T > &v, const Vec3T< T > &lo, const Vec3T< T > &hi) noexcept
Component-wise clamp of a 3D vector.
constexpr Vec3T< T > cross(const Vec3T< T > &u, const Vec3T< T > &v) noexcept
Cross product of two 3D vectors.