Enroute Flight Navigation
A navigation app for VFR pilots
|
Convenience class for volume computations. More...
#include <Volume.h>
Public Member Functions | |
Q_INVOKABLE bool | isFinite () const |
Checks if the volume is valid. | |
Q_INVOKABLE Units::Volume & | operator+= (Units::Volume other) |
Add volume to this volume. | |
Q_INVOKABLE std::partial_ordering | operator<=> (const Units::Volume &rhs) const =default |
Comparison. | |
Q_INVOKABLE double | toL () const |
Convert to liters. | |
Q_INVOKABLE double | toGAL () const |
Convert to gallons. | |
Static Public Member Functions | |
static constexpr auto | fromL (double volumeInL) -> Volume |
Constructs a volume. | |
static constexpr auto | fromGAL (double volumeInGAL) -> Volume |
Constructs a volume. | |
Convenience class for volume computations.
This extremely simple class allows computation with volumes, without the need to worry about units. On construction, the volume is set to NaN.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinenodiscard |
|
inline |
|
nodiscarddefault |
Comparison.
rhs | Right hand side of the comparison |
|
inlinenodiscard |
|
inlinenodiscard |