@@ -69,7 +69,7 @@ impl Humidity {
69
69
/// Calculates Dewpoint from humidity and air temperature using the Magnus-Tetens
70
70
/// approximation, with coefficients derived by Alduchov and Eskridge (1996). The formulas assume
71
71
// standard atmospheric pressure.
72
- #[ cfg( not ( feature = "no_std" ) ) ]
72
+ #[ cfg( feature = "std" ) ]
73
73
pub fn as_dewpoint ( & self , temp : Temperature ) -> Temperature {
74
74
let humidity = self . relative_humidity / 100.0 ;
75
75
let celsius = temp. as_celsius ( ) ;
@@ -81,7 +81,7 @@ impl Humidity {
81
81
/// Calculates Dewpoint from humidity and air temperature using the Magnus-Tetens
82
82
/// approximation, with coefficients derived by Alduchov and Eskridge (1996). The formulas assume
83
83
// standard atmospheric pressure.
84
- #[ cfg( feature = "no_std" ) ]
84
+ #[ cfg( not ( feature = "std" ) ) ]
85
85
pub fn as_dewpoint ( & self , temp : Temperature ) -> Temperature {
86
86
let humidity = self . relative_humidity / 100.0 ;
87
87
let celsius = temp. as_celsius ( ) ;
@@ -94,7 +94,7 @@ impl Humidity {
94
94
/// Calculates the actual vapour pressure in the air, based on the air temperature and humidity
95
95
/// at standard atmospheric pressure (1013.25 mb), using the Buck formula (accurate to +/- 0.02%
96
96
/// between 0 deg C and 50 deg C)
97
- #[ cfg( not ( feature = "no_std" ) ) ]
97
+ #[ cfg( feature = "std" ) ]
98
98
pub fn as_vapor_pressure ( & self , temp : Temperature ) -> Pressure {
99
99
let temp = temp. as_celsius ( ) ;
100
100
let saturation_vapor_pressure =
@@ -105,7 +105,7 @@ impl Humidity {
105
105
/// Calculates the actual vapour pressure in the air, based on the air temperature and humidity
106
106
/// at standard atmospheric pressure (1013.25 mb), using the Buck formula (accurate to +/- 0.02%
107
107
/// between 0 deg C and 50 deg C)
108
- #[ cfg( feature = "no_std" ) ]
108
+ #[ cfg( not ( feature = "std" ) ) ]
109
109
pub fn as_vapor_pressure ( & self , temp : Temperature ) -> Pressure {
110
110
let temp = temp. as_celsius ( ) ;
111
111
let saturation_vapor_pressure =
@@ -125,7 +125,7 @@ impl Humidity {
125
125
/// Calculates humidity from dewpoint and air temperature using the Magnus-Tetens
126
126
/// Approximation, with coefficients derived by Alduchov and Eskridge (1996). The formulas assume
127
127
// standard atmospheric pressure.
128
- #[ cfg( not ( feature = "no_std" ) ) ]
128
+ #[ cfg( feature = "std" ) ]
129
129
pub fn from_dewpoint ( dewpoint : Temperature , temp : Temperature ) -> Humidity {
130
130
let dewpoint = dewpoint. as_celsius ( ) ;
131
131
let temp = temp. as_celsius ( ) ;
@@ -138,7 +138,7 @@ impl Humidity {
138
138
/// Calculates humidity from dewpoint and air temperature using the Magnus-Tetens
139
139
/// Approximation, with coefficients derived by Alduchov and Eskridge (1996). The formulas assume
140
140
// standard atmospheric pressure.
141
- #[ cfg( feature = "no_std" ) ]
141
+ #[ cfg( not ( feature = "std" ) ) ]
142
142
pub fn from_dewpoint ( dewpoint : Temperature , temp : Temperature ) -> Humidity {
143
143
let dewpoint = dewpoint. as_celsius ( ) ;
144
144
let temp = temp. as_celsius ( ) ;
0 commit comments