-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathlength_lit.cpp
More file actions
41 lines (36 loc) · 854 Bytes
/
length_lit.cpp
File metadata and controls
41 lines (36 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
double operator""_cm_to_m(long double x) {
return x / 100.0;
}
double operator""_m_to_cm(long double x) {
return x* 100.0;
}
double operator""_in_to_ft(long double x) {
return x / 12.0;
}
double operator""_ft_to_in(long double x) {
return x * 12.0;
}
double operator""_m_to_ft(long double x) {
return x / 0.3048;
}
double operator""_ft_to_m(long double x) {
return x * 0.3048;
}
double operator""_cm_to_ft(long double x) {
return x / 30.48;
}
double operator""_ft_to_cm(long double x) {
return x * 30.48;
}
double operator""_cm_to_in(long double x) {
return x / 30.48 * 12.0;
}
double operator""_m_to_in(long double x) {
return x* 100.0 / 30.48 * 12.0;
}
double operator""_in_to_cm(long double x) {
return x / 12.0 * 30.48;
}
double operator""_in_to_m(long double x) {
return x / 12.0 * 30.48 / 100;
}