WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Convert.h
1#ifndef _WINC_CONVERT
2#define _WINC_CONVERT
3
4#include <WXP/Const.h>
5
6namespace WXP {
13 class Convert {
14 public:
15 /*
16 Define some simple unit conversion macros
17 */
19 static inline float CtoF( float t ){
20 return t != Const::MISS ? t*9/5+32 : Const::MISS;}
22 static inline float KtoF( float t ){
23 return t != Const::MISS ? (t-273.15)*9/5+32 : Const::MISS;}
25 static inline float CtoK( float t ){
26 return t != Const::MISS ? t+273.15 : Const::MISS;}
28 static inline float FtoK( float t ){
29 return t != Const::MISS ? (t-32.)*5/9+273.15 : Const::MISS;}
31 static inline float FtoC( float t ){
32 return t != Const::MISS ? (t-32.)*5/9 : Const::MISS;}
34 static inline float KtoC( float t ){
35 return t != Const::MISS ? t-273.15 : Const::MISS;}
37 static inline float INtoMB( float p ){
38 return p != Const::MISS ? p*33.85399 : Const::MISS;}
40 static inline float MBtoIN( float p ){
41 return p != Const::MISS ? p*.0295386 : Const::MISS;}
43 static inline float KTtoMPS( float w ){
44 return w != Const::MISS ? w*.5144 : Const::MISS;}
46 static inline float MPStoKT( float w ){
47 return w != Const::MISS ? w*1.944 : Const::MISS;}
49 static inline float KTtoKMH( float l ){
50 return l != Const::MISS ? l*1.852 : Const::MISS;}
52 static inline float KMHtoKT( float l ){
53 return l != Const::MISS ? l*0.53996 : Const::MISS;}
55 static inline float KTtoMPH( float l ){
56 return l != Const::MISS ? l*1.1508 : Const::MISS;}
58 static inline float MPHtoKT( float l ){
59 return l != Const::MISS ? l*0.86897 : Const::MISS;}
61 static inline float MPHtoMPS( float l ){
62 return l != Const::MISS ? l*0.4470 : Const::MISS;}
64 static inline float MPStoMPH( float l ){
65 return l != Const::MISS ? l*2.23694 : Const::MISS;}
67 static inline float FTtoM( float l ){
68 return l != Const::MISS ? l*.3048 : Const::MISS;}
70 static inline float MtoFT( float l ){
71 return l != Const::MISS ? l*3.2808 : Const::MISS;}
73 static inline float MtoMI( float l ){
74 return l != Const::MISS ? l*6.2136E-4 : Const::MISS;}
76 static inline float INtoMM( float l ){
77 return l != Const::MISS ? l*25.4 : Const::MISS;}
79 static inline float MMtoIN( float l ){
80 return l != Const::MISS ? l*.03937 : Const::MISS;}
82 static inline float INtoCM( float l ){
83 return l != Const::MISS ? l*2.54 : Const::MISS;}
85 static inline float CMtoIN( float l ){
86 return l != Const::MISS ? l*.3937 : Const::MISS;}
88 static inline float SMtoKM( float l ){
89 return l != Const::MISS ? l*1.60934 : Const::MISS;}
91 static inline float KMtoSM( float l ){
92 return l != Const::MISS ? l*.62137 : Const::MISS;}
94 static inline float SMtoNM( float l ){
95 return l != Const::MISS ? l*.86897 : Const::MISS;}
97 static inline float NMtoSM( float l ){
98 return l != Const::MISS ? l*1.1508 : Const::MISS;}
100 static inline float NMtoKM( float l ){
101 return l != Const::MISS ? l*1.852 : Const::MISS;}
103 static inline float KMtoNM( float l ){
104 return l != Const::MISS ? l*.53996 : Const::MISS;}
106 static inline float NMtoFT( float l ){
107 return l != Const::MISS ? l*6076.22 : Const::MISS;}
108
109 };
110}
111#endif
static const int MISS
Definition Const.h:7
This defines some simple conversion factors.
Definition Convert.h:13
static float MBtoIN(float p)
Definition Convert.h:40
static float KTtoMPS(float w)
Definition Convert.h:43
static float NMtoSM(float l)
Definition Convert.h:97
static float CtoK(float t)
Definition Convert.h:25
static float KMHtoKT(float l)
Definition Convert.h:52
static float KTtoMPH(float l)
Definition Convert.h:55
static float NMtoFT(float l)
Definition Convert.h:106
static float KTtoKMH(float l)
Definition Convert.h:49
static float MPStoKT(float w)
Definition Convert.h:46
static float MPStoMPH(float l)
Definition Convert.h:64
static float CMtoIN(float l)
Definition Convert.h:85
static float NMtoKM(float l)
Definition Convert.h:100
static float INtoMB(float p)
Definition Convert.h:37
static float MPHtoKT(float l)
Definition Convert.h:58
static float KtoF(float t)
Definition Convert.h:22
static float INtoCM(float l)
Definition Convert.h:82
static float MtoMI(float l)
Definition Convert.h:73
static float FtoC(float t)
Definition Convert.h:31
static float KMtoNM(float l)
Definition Convert.h:103
static float MtoFT(float l)
Definition Convert.h:70
static float KMtoSM(float l)
Definition Convert.h:91
static float KtoC(float t)
Definition Convert.h:34
static float CtoF(float t)
Definition Convert.h:19
static float MPHtoMPS(float l)
Definition Convert.h:61
static float MMtoIN(float l)
Definition Convert.h:79
static float SMtoNM(float l)
Definition Convert.h:94
static float FTtoM(float l)
Definition Convert.h:67
static float INtoMM(float l)
Definition Convert.h:76
static float SMtoKM(float l)
Definition Convert.h:88
static float FtoK(float t)
Definition Convert.h:28
All WXP classes fall under the WXP namespace.
Definition Angle.h:4