3#include "../util/types.hpp"
5#include "boost/algorithm/string.hpp"
50 cerr <<
"An pixel cannot be initialized with dimensions" <<
endl;
63 value = std::move(x.get_value());
87 cerr <<
"An pixel cannot be initialized with dimensions" <<
endl;
308 return !(x == init_pixel);
319 return !(init_pixel == x);
324 ostringstream output;
331 ostringstream output;
339 ostringstream output;
347 return os << to_string(x);
Class that represents dimensions of the SI system of units. Each dimension sizes 6 bytes,...
@ NUMERATOR
The dimension is at the numerator.
@ PIXEL
Pixel, plural pixels. it represents the amount of pixels, it can be used as a replacemet of the metre...
void operator^=(const pixel &x)
void operator+=(const pixel &x)
pixel operator^(const pixel &x) const
pixel operator-(const pixel &x) const
pixel & operator=(const pixel &x)
const float & get_value() const
scalar_unit to_scalar_unit() const
pixel operator*(const pixel &x) const
void operator-=(const pixel &x)
pixel operator+(const pixel &x) const
string display(int number_of_decimals=2) const
void operator*=(const pixel &x)
void operator/=(const pixel &x)
pixel operator/(const pixel &x) const
void initialize_from_string(const string &init_pixel)
@ NONE
There is no prefix. Then, the dimension is not increased or decreased by some factor.
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.
angle sqrt_nth(const angle &x, int index)
Calculates the nth root of the angle x and returns that new angle.
string to_string(const aid &x)
Creates a string representation of aid, it's for aid equivalent to the display() function of aid.
string display_float(const float &value, int number_of_decimals)
bool is_pixel(const string &init_pixel)
angle sqrt(const angle &x)
Calculates the square root of the angle x and returns that new angle.
bool operator!=(const scifir::pixel &x, const scifir::pixel &y)
void operator+=(string &x, const scifir::pixel &y)
bool operator<=(const scifir::pixel &x, const scifir::pixel &y)
bool operator>=(const scifir::pixel &x, const scifir::pixel &y)
bool operator<(const scifir::pixel &x, const scifir::pixel &y)
bool operator==(const scifir::pixel &x, const scifir::pixel &y)
istream & operator>>(istream &is, scifir::pixel &x)
ostream & operator<<(ostream &os, const scifir::pixel &x)
string operator+(const string &x, const scifir::pixel &y)
bool operator>(const scifir::pixel &x, const scifir::pixel &y)