3#include "../util/types.hpp"
5#include "boost/algorithm/string.hpp"
6#include "unicode/unistr.h"
7#include "unicode/uchar.h"
65 cerr <<
"A longitude cannot be initialized with dimensions" <<
endl;
83 value = std::move(x.get_value());
109 cerr <<
"A longitude cannot be initialized with dimensions" <<
endl;
120 else if (
value < 0.0f)
124 else if (
value == 0.0f)
137 else if (
value < 0.0f)
151 else if (
value < -180.0f)
164 else if (x <= 180.0f)
Class that allows to work with angles. Each angle sizes 4 bytes. Initialization string example: "20°"...
const float & get_value() const
Gets the value of the angle, in degrees.
float value
Value of the angle. It is stored in degrees.
void initialize_from_string(string init_longitude)
longitude::position get_position() const
longitude & operator=(const longitude &x)
void initialize_from_angle(const angle &x)
Class that allows to create scalar units, which are composed of a value (as a float) and dimensions....
bool has_empty_dimensions() const
Checks if there aren't base dimensions.
const float & get_value() const
Read-only getter of the value.
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
bool is_longitude(const string &init_longitude)