@@ -71,7 +71,7 @@ double value_d = speed_of_light * 2.0;
71
71
72
72
73
73
# Another examples
74
- You can create functions that will automatically adjust order of parameters. [ godbolt] ( https://godbolt.org/z/n8Ez5K6vq )
74
+ You can create functions that will automatically adjust order of parameters. [ godbolt] ( https://godbolt.org/z/roar9468x )
75
75
76
76
``` c++
77
77
using rho_type = boxed::boxed<double >;
@@ -103,13 +103,12 @@ int main() {
103
103
theta_type theta{3.14 / 3.0};
104
104
phi_type phi{3.14 / 2.0};
105
105
106
- std::cout << x_coord(rho, theta, phi) << std::endl;
107
- std::cout << x_coord(phi, theta, rho) << std::endl;
108
- std::cout << x_coord(rho, phi, theta) << std::endl;
106
+ x_coord(rho, theta, phi) == x_coord(phi, theta, rho);
107
+ x_coord(rho, theta, phi) == x_coord(theta, phi, rho);
109
108
}
110
109
```
111
110
112
- Or using another approach: [godbolt](https://godbolt.org/z/fjhaaT5hh )
111
+ Or using another approach: [godbolt](https://godbolt.org/z/rn1f4xbd6 )
113
112
114
113
``` c++
115
114
using rho_type = boxed::boxed<double>;
@@ -149,9 +148,8 @@ int main() {
149
148
theta_type theta{3.14 / 3.0};
150
149
phi_type phi{3.14 / 2.0};
151
150
152
- std::cout << x_coord(rho, theta, phi) << std::endl;
153
- std::cout << x_coord(phi, theta, rho) << std::endl;
154
- std::cout << x_coord(rho, phi, theta) << std::endl;
151
+ x_coord(rho, theta, phi) == x_coord(phi, theta, rho);
152
+ x_coord(rho, theta, phi) == x_coord(theta, phi, rho);
155
153
}
156
154
```
157
155
0 commit comments