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_3dr.cpp
Go to the documentation of this file.
2
3using namespace std;
4
5namespace scifir
6{
8 {
9 return x.display_cartesian();
10 }
11
13 {
14 return float(std::sqrt(std::pow(x.x - y.x,2) + std::pow(x.y - y.y,2) + std::pow(x.z - y.z,2)));
15 }
16
18 {
19 return float(std::sqrt(std::pow(x.x - y.x,2) + std::pow(x.y - y.y,2) + std::pow(x.z - y.z,2)));
20 }
21
23 {
24 return float(std::sqrt(std::pow(x.x - y.x,2) + std::pow(x.y - y.y,2) + std::pow(x.z - y.z,2)));
25 }
26}
27
28ostream& operator <<(ostream& os,const scifir::coordinates_3dr<float>& x)
29{
30 return os << scifir::to_string(x);
31}
string display_cartesian() const
ostream & operator<<(ostream &os, const scifir::coordinates_3dr< 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)