40#ifndef Foam_Vector2D_H
41#define Foam_Vector2D_H
99 inline Vector2D(
const Cmpt& vx,
const Cmpt& vy);
108 inline const Cmpt&
x()
const;
111 inline const Cmpt&
y()
const;
137 const scalar tol = 1
e-10
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
Cmpt & y()
Access to the vector y component.
scalar perp(const Vector2D< Cmpt > &b) const
Perp dot product (dot product with perpendicular vector)
components
Component labeling enumeration.
Cmpt & x()
Access to the vector x component.
static constexpr direction rank
Rank of Vector2D is 1.
Vector2D & operator=(const Vector2D &)=default
Copy assignment.
bool isClose(const Vector2D< Cmpt > &b, const scalar tol=1e-10) const
Return true if vector is within tol.
Vector2D()=default
Default construct.
Vector2D(const Vector2D &)=default
Copy construct.
Vector2D< Cmpt > & removeCollinear(const Vector2D< Cmpt > &unitVec)
Vector2D< label > labelType
Equivalent type of labels used for valid component indexing.
Vector2D< Cmpt > & normalise(const scalar tol=ROOTVSMALL)
Normalise the vector by its magnitude.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
A template class to specify if a data type is composed solely of Foam::label elements.
A template class to specify if a data type is composed solely of Foam::scalar elements.
A template class to specify that a data type can be considered as being contiguous in memory.