19 #ifndef MIR_GEOMETRY_LENGTH_H_
20 #define MIR_GEOMETRY_LENGTH_H_
47 return static_cast<float>(magnitude) / units;
57 return magnitude == rhs.magnitude;
62 return magnitude != rhs.magnitude;
69 inline Length operator"" _mm(
long double mag)
74 inline Length operator"" _mm(
unsigned long long mag)
79 inline Length operator"" _cm(
long double mag)
84 inline Length operator"" _cm(
unsigned long long mag)
89 inline Length operator"" _in(
long double mag)
94 inline Length operator"" _in(
unsigned long long mag)
102 #endif // MIR_GEOMETRY_LENGTH_H_
All things Mir.
Definition: aging_buffer.h:24
Length & operator=(Length const &)=default
Units
Definition: length.h:32
float as(Units units) const
Definition: length.h:45
Length(float mag, Units units)
Definition: length.h:43
Length represents a physical length in the real world. The number of pixels this equates to can then ...
Definition: length.h:29
bool operator==(Length const &rhs) const
Definition: length.h:55
Length()
Definition: length.h:40
float as_pixels(float dpi) const
Definition: length.h:50
bool operator!=(Length const &rhs) const
Definition: length.h:60