Struct RelativeHumidity
- Namespace
- UnitsNet
- Assembly
- UnitsNet.RelativeHumidity.dll
Relative humidity is a ratio of the actual water vapor present in the air to the maximum water vapor in the air at the given temperature.
public struct RelativeHumidity
Constructors
RelativeHumidity(double, RelativeHumidityUnit)
Creates the quantity with the given numeric value and unit.
public RelativeHumidity(double value, RelativeHumidityUnit unit)
Parameters
value
doubleThe numeric value to construct this quantity with.
unit
RelativeHumidityUnitThe unit representation to construct this quantity with.
Exceptions
- ArgumentException
If value is NaN or Infinity.
Properties
BaseUnit
The base unit of RelativeHumidity, which is Second. All conversions go via this value.
public static RelativeHumidityUnit BaseUnit { get; }
Property Value
MaxValue
Represents the largest possible value of RelativeHumidity.
public static RelativeHumidity MaxValue { get; }
Property Value
MinValue
Represents the smallest possible value of RelativeHumidity.
public static RelativeHumidity MinValue { get; }
Property Value
Percent
public double Percent { get; }
Property Value
Unit
public RelativeHumidityUnit Unit { get; }
Property Value
Value
The numeric value this quantity was constructed with.
public double Value { get; }
Property Value
Zero
Gets an instance of this quantity with a value of 0 in the base unit Second.
public static RelativeHumidity Zero { get; }
Property Value
Methods
As(RelativeHumidityUnit)
Convert to the unit representation unit
.
public double As(RelativeHumidityUnit unit)
Parameters
unit
RelativeHumidityUnit
Returns
- double
Value converted to the specified unit.
From(double, RelativeHumidityUnit)
Dynamically convert from value and unit enum RelativeHumidityUnit to RelativeHumidity.
public static RelativeHumidity From(double value, RelativeHumidityUnit fromUnit)
Parameters
value
doubleValue to convert from.
fromUnit
RelativeHumidityUnitUnit to convert from.
Returns
- RelativeHumidity
RelativeHumidity unit value.
FromPercent(double)
Creates a RelativeHumidity from Percent.
public static RelativeHumidity FromPercent(double percent)
Parameters
percent
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
ToUnit(RelativeHumidityUnit)
Converts this RelativeHumidity to another RelativeHumidity with the unit representation unit
.
public RelativeHumidity ToUnit(RelativeHumidityUnit unit)
Parameters
unit
RelativeHumidityUnit
Returns
- RelativeHumidity
A RelativeHumidity with the specified unit.