19 #ifndef MIR_GEOMETRY_DISPLACEMENT_H_ 20 #define MIR_GEOMETRY_DISPLACEMENT_H_ 39 template<
typename DeltaXType,
typename DeltaYType>
54 return lhs.
dx == rhs.
dx && lhs.
dy == rhs.
dy;
59 return lhs.
dx != rhs.
dx || lhs.
dy != rhs.
dy;
62 std::ostream&
operator<<(std::ostream& out, Displacement
const& value);
99 template<
typename Scalar>
105 template<
typename Scalar>
Definition: splash_session.h:24
constexpr Point as_point(Displacement const &disp)
Definition: displacement.h:126
DeltaY dy
Definition: displacement.h:49
X x
Definition: point.h:39
DeltaX dx
Definition: displacement.h:48
constexpr DeltaX operator-(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:119
Y y
Definition: point.h:40
long long length_squared() const
Definition: displacement.h:42
constexpr Displacement(DeltaXType &&dx, DeltaYType &&dy)
Definition: displacement.h:40
constexpr int as_int() const
Definition: dimensions.h:53
constexpr Displacement as_displacement(Size const &size)
Definition: displacement.h:111
constexpr DeltaX operator+(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:117
constexpr Width operator*(Scalar scale, Width const &w)
Definition: dimensions.h:156
Definition: displacement.h:33
constexpr Size as_size(Displacement const &disp)
Definition: displacement.h:116
Displacement & operator=(Displacement const &)=default
Height height
Definition: size.h:41
constexpr Displacement()
Definition: displacement.h:35
std::ostream & operator<<(std::ostream &out, Displacement const &value)
Width width
Definition: size.h:40
bool operator<(Displacement const &lhs, Displacement const &rhs)
Definition: displacement.h:94
constexpr bool operator==(Displacement const &lhs, Displacement const &rhs)
Definition: displacement.h:52
constexpr bool operator!=(Displacement const &lhs, Displacement const &rhs)
Definition: displacement.h:57