Go to the documentation of this file.
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;
96 return lhs = lhs + rhs;
101 return lhs = lhs - rhs;
109 template<
typename Scalar>
115 template<
typename Scalar>
DeltaX & operator+=(DeltaX &lhs, DeltaX rhs)
Definition: dimensions.h:121
constexpr Displacement(Displacement const &)=default
constexpr DeltaX operator-(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:119
DeltaY dy
Definition: displacement.h:49
bool operator<(Displacement const &lhs, Displacement const &rhs)
Definition: displacement.h:104
DeltaX dx
Definition: displacement.h:48
X x
Definition: point.h:39
DeltaX & operator-=(DeltaX &lhs, DeltaX rhs)
Definition: dimensions.h:123
constexpr DeltaX operator+(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:117
constexpr bool operator==(Displacement const &lhs, Displacement const &rhs)
Definition: displacement.h:52
Definition: splash_session.h:24
long long length_squared() const
Definition: displacement.h:42
Height height
Definition: size.h:41
constexpr Displacement as_displacement(Size const &size)
Definition: displacement.h:121
constexpr Width operator*(Scalar scale, Width const &w)
Definition: dimensions.h:162
constexpr bool operator!=(Displacement const &lhs, Displacement const &rhs)
Definition: displacement.h:57
constexpr Displacement(DeltaXType &&dx, DeltaYType &&dy)
Definition: displacement.h:40
Y y
Definition: point.h:40
constexpr Point as_point(Displacement const &disp)
Definition: displacement.h:136
Definition: displacement.h:34
constexpr Size as_size(Displacement const &disp)
Definition: displacement.h:126
std::ostream & operator<<(std::ostream &out, Displacement const &value)
Width width
Definition: size.h:40
constexpr int as_int() const
Definition: dimensions.h:53
constexpr Displacement()
Definition: displacement.h:35
Displacement & operator=(Displacement const &)=default
Copyright © 2012-2020
Canonical Ltd.
Generated on Sun Sep 27 19:03:53 UTC 2020
This documentation is licensed under the GPL version 2 or 3.