Characteristic | Locus |
---|---|
Implements | IComparable IFormattable IConvertible IEquatable<double> IComparable<double> |
Inherited Members | object.Equals(object, object) object.GetType() object.ReferenceEquals(object, object) |
Namespace | Meadow.Units |
Assembly | Meadow.Units.dll |
Syntax
[Serializable]
public struct RelativeHumidity : IComparable, IFormattable, IConvertible, IEquatable<double>, IComparable<double>
Constructors
RelativeHumidity(RelativeHumidity)
Creates a new RelativeHumidity
object from an existing RelativeHumidity object
Declaration
public RelativeHumidity(RelativeHumidity relativeHumidity)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | relativeHumidity |
RelativeHumidity(double, UnitType)
Creates a new RelativeHumidity
object.
Declaration
public RelativeHumidity(double value, RelativeHumidity.UnitType type = UnitType.Percent)
Parameters
Type | Name | Description |
---|---|---|
double | value | The relative humidity value. |
RelativeHumidity.UnitType | type | Relative humidity unit. |
Properties
Percent
The relative expressed as a value percent.
Declaration
public readonly double Percent { get; }
Property Value
Type | Description |
---|---|
double |
Methods
Abs()
Returns the absolute value of the RelativeHumidity
Declaration
[Pure]
public RelativeHumidity Abs()
Returns
Type | Description |
---|---|
RelativeHumidity |
CompareTo(RelativeHumidity)
Compare to another RelativeHumidity object
Declaration
[Pure]
public int CompareTo(RelativeHumidity other)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | other |
Returns
Type | Description |
---|---|
int | 0 if equal |
CompareTo(double)
Compare the default value to a double
Declaration
[Pure]
public int CompareTo(double other)
Parameters
Type | Name | Description |
---|---|---|
double | other | value to compare |
Returns
Type | Description |
---|---|
int | 0 if equal |
CompareTo(double?)
Compare the default value to a double
Declaration
[Pure]
public int CompareTo(double? other)
Parameters
Type | Name | Description |
---|---|---|
double? | other | value to compare |
Returns
Type | Description |
---|---|
int | 0 if equal |
CompareTo(object)
Compare to another RelativeHumidity object
Declaration
[Pure]
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The other RelativeHumidity cast to object |
Returns
Type | Description |
---|---|
int | 0 if equal |
Equals(RelativeHumidity)
Compare to another RelativeHumidity object
Declaration
[Pure]
public bool Equals(RelativeHumidity other)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | other | The object to compare |
Returns
Type | Description |
---|---|
bool | true if equal |
Equals(double)
Compare the default value to a double
Declaration
[Pure]
public bool Equals(double other)
Parameters
Type | Name | Description |
---|---|---|
double | other | value to compare |
Returns
Type | Description |
---|---|
bool | 0 if equal |
Equals(double?)
Compare the default value to a double
Declaration
[Pure]
public bool Equals(double? other)
Parameters
Type | Name | Description |
---|---|---|
double? | other | value to compare |
Returns
Type | Description |
---|---|
bool | 0 if equal |
Equals(object)
Compare to another RelativeHumidity object
Declaration
[Pure]
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare |
Returns
Type | Description |
---|---|
bool | true if equal |
Overrides
GetHashCode()
Get hash of object
Declaration
[Pure]
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | int32 hash value |
Overrides
GetTypeCode()
Get type code of object
Declaration
[Pure]
public TypeCode GetTypeCode()
Returns
Type | Description |
---|---|
TypeCode | The TypeCode |
ToBoolean(IFormatProvider)
Convert to boolean
Declaration
[Pure]
public bool ToBoolean(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
bool | bool representation of the object |
ToByte(IFormatProvider)
Convert to byte
Declaration
[Pure]
public byte ToByte(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
byte | byte representation of the object |
ToChar(IFormatProvider)
Convert to char
Declaration
[Pure]
public char ToChar(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
char | char representation of the object |
ToDateTime(IFormatProvider)
Convert to DateTime
Declaration
[Pure]
public DateTime ToDateTime(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
DateTime | DateTime representation of the object |
ToDecimal(IFormatProvider)
Convert to Decimal
Declaration
[Pure]
public decimal ToDecimal(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
decimal | Decimal representation of the object |
ToDouble(IFormatProvider)
Convert to double
Declaration
[Pure]
public double ToDouble(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
double | double representation of the object |
ToInt16(IFormatProvider)
Convert to in16
Declaration
[Pure]
public short ToInt16(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
short | int16 representation of the object |
ToInt32(IFormatProvider)
Convert to int32
Declaration
[Pure]
public int ToInt32(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
int | int32 representation of the object |
ToInt64(IFormatProvider)
Convert to int64
Declaration
[Pure]
public long ToInt64(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
long | int64 representation of the object |
ToSByte(IFormatProvider)
Convert to sbyte
Declaration
[Pure]
public sbyte ToSByte(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
sbyte | sbyte representation of the object |
ToSingle(IFormatProvider)
Convert to float
Declaration
[Pure]
public float ToSingle(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
float | float representation of the object |
ToString()
Get a string representation of the object
Declaration
[Pure]
public override string ToString()
Returns
Type | Description |
---|---|
string | A string representing the object |
Overrides
ToString(IFormatProvider)
Convert to string
Declaration
[Pure]
public string ToString(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
string | string representation of the object |
ToString(string, IFormatProvider)
Get a string representation of the object
Declaration
[Pure]
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Type | Name | Description |
---|---|---|
string | format | format |
IFormatProvider | formatProvider | format provider |
Returns
Type | Description |
---|---|
string | A string representing the object |
ToType(Type, IFormatProvider)
Convert to type
Declaration
[Pure]
public object ToType(Type conversionType, IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Type | conversionType | unit to convert |
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
object | type representation of the object |
ToUInt16(IFormatProvider)
Convert to uint16
Declaration
[Pure]
public ushort ToUInt16(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
ushort | uint16 representation of the object |
ToUInt32(IFormatProvider)
Convert to uint32
Declaration
[Pure]
public uint ToUInt32(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
uint | uint32 representation of the object |
ToUInt64(IFormatProvider)
Convert to uint64
Declaration
[Pure]
public ulong ToUInt64(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | provider | format provider |
Returns
Type | Description |
---|---|
ulong | uint64 representation of the object |
Operators
operator +(RelativeHumidity, RelativeHumidity)
Addition operator to add two RelativeHumidity objects
Declaration
[Pure]
public static RelativeHumidity operator +(RelativeHumidity left, RelativeHumidity right)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | left | left value |
RelativeHumidity | right | right value |
Returns
Type | Description |
---|---|
RelativeHumidity | A new RelativeHumidity object with a value of left + right |
operator /(RelativeHumidity, double)
Division operator to divide by a double
Declaration
[Pure]
public static RelativeHumidity operator /(RelativeHumidity value, double operand)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | value | object to be divided |
double | operand | operand to divide object |
Returns
Type | Description |
---|---|
RelativeHumidity | A new RelativeHumidity object with a value of value divided by the operand |
operator ==(RelativeHumidity, RelativeHumidity)
Equals operator to compare two RelativeHumidity objects
Declaration
[Pure]
public static bool operator ==(RelativeHumidity left, RelativeHumidity right)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | left | left value |
RelativeHumidity | right | right value |
Returns
Type | Description |
---|---|
bool | true if equal |
operator >(RelativeHumidity, RelativeHumidity)
Greater than operator to compare two RelativeHumidity objects
Declaration
[Pure]
public static bool operator >(RelativeHumidity left, RelativeHumidity right)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | left | left value |
RelativeHumidity | right | right value |
Returns
Type | Description |
---|---|
bool | true if left is greater than right |
operator >=(RelativeHumidity, RelativeHumidity)
Greater than or equal operator to compare two RelativeHumidity objects
Declaration
[Pure]
public static bool operator >=(RelativeHumidity left, RelativeHumidity right)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | left | left value |
RelativeHumidity | right | right value |
Returns
Type | Description |
---|---|
bool | true if left is greater than or equal to right |
operator !=(RelativeHumidity, RelativeHumidity)
Not equals operator to compare two RelativeHumidity objects
Declaration
[Pure]
public static bool operator !=(RelativeHumidity left, RelativeHumidity right)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | left | left value |
RelativeHumidity | right | right value |
Returns
Type | Description |
---|---|
bool | true if not equal |
operator <(RelativeHumidity, RelativeHumidity)
Less than operator to compare two RelativeHumidity objects
Declaration
[Pure]
public static bool operator <(RelativeHumidity left, RelativeHumidity right)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | left | left value |
RelativeHumidity | right | right value |
Returns
Type | Description |
---|---|
bool | true if left is less than right |
operator <=(RelativeHumidity, RelativeHumidity)
Less than or equal operator to compare two RelativeHumidity objects
Declaration
[Pure]
public static bool operator <=(RelativeHumidity left, RelativeHumidity right)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | left | left value |
RelativeHumidity | right | right value |
Returns
Type | Description |
---|---|
bool | true if left is less than or equal to right |
operator *(RelativeHumidity, double)
Multiplication operator to multiply by a double
Declaration
[Pure]
public static RelativeHumidity operator *(RelativeHumidity value, double operand)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | value | object to multiply |
double | operand | operand to multiply object |
Returns
Type | Description |
---|---|
RelativeHumidity | A new RelativeHumidity object with a value of value multiplied by the operand |
operator -(RelativeHumidity, RelativeHumidity)
Subtraction operator to subtract two RelativeHumidity objects
Declaration
[Pure]
public static RelativeHumidity operator -(RelativeHumidity left, RelativeHumidity right)
Parameters
Type | Name | Description |
---|---|---|
RelativeHumidity | left | left value |
RelativeHumidity | right | right value |
Returns
Type | Description |
---|---|
RelativeHumidity | A new RelativeHumidity object with a value of left - right |