scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
Loading...
Searching...
No Matches
coordinates_1d.cpp
Go to the documentation of this file.
2#include "../util/types.hpp"
3
4using namespace std;
5
6namespace scifir
7{
9 {
10 return x.display_cartesian();
11 }
12
14 {
15 return float(std::sqrt(std::pow(x.x - y.x,2)));
16 }
17}
18
19ostream& operator <<(ostream& os,const scifir::coordinates_1d<float>& x)
20{
21 return os << scifir::to_string(x);
22}
string display_cartesian() const
ostream & operator<<(ostream &os, const scifir::coordinates_1d< float > &x)
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
Definition address.cpp:6
string to_string(const aid &x)
Creates a string representation of aid, it's for aid equivalent to the display() function of aid.
Definition aid.cpp:582
float distance(const coordinates_1d< float > &x, const coordinates_1d< float > &y)