Temperature Structure

Represents an amount of heat in the environment.

Definition

Namespace: InnerDrive.Quantitative
Assembly: InnerDrive.Quantitative (in InnerDrive.Quantitative.dll) Version: 5.2.9017.0
C#
[SerializableAttribute]
[JsonObjectAttribute(ItemTypeNameHandling = TypeNameHandling.Auto)]
public struct Temperature : IAdditionOperators<Temperature, Temperature, Temperature>, 
	IAdditionOperators<Temperature, double, Temperature>, IAdditionOperators<Temperature, int, Temperature>, 
	ICloneable, IComparable, IComparable<Temperature>, IComparisonOperators<Temperature, Temperature, bool>, 
	IEqualityOperators<Temperature, Temperature, bool>, IComparisonOperators<Temperature, double, bool>, 
	IEqualityOperators<Temperature, double, bool>, IConvertible<Temperature>, 
	IDivisionOperators<Temperature, double, Temperature>, IDivisionOperators<Temperature, int, Temperature>, 
	IEquatable<Temperature>, IMeasurable, IFormattable, IMinMaxValue<Temperature>, 
	IMultiplyOperators<Temperature, double, Temperature>, IMultiplyOperators<Temperature, int, Temperature>, 
	ISubtractionOperators<Temperature, Temperature, Temperature>, ISubtractionOperators<Temperature, double, Temperature>, 
	ISubtractionOperators<Temperature, int, Temperature>, IUnaryNegationOperators<Temperature, Temperature>, 
	ISpanFormattable
Inheritance
Object    ValueType    Temperature
Implements
IConvertibleTemperature, IMeasurable, ICloneable, IComparable, IComparableTemperature, IEquatableTemperature, IFormattable, ISpanFormattable, IAdditionOperatorsTemperature, Temperature, Temperature, IAdditionOperatorsTemperature, Double, Temperature, IAdditionOperatorsTemperature, Int32, Temperature, IComparisonOperatorsTemperature, Temperature, Boolean, IComparisonOperatorsTemperature, Double, Boolean, IDivisionOperatorsTemperature, Double, Temperature, IDivisionOperatorsTemperature, Int32, Temperature, IEqualityOperatorsTemperature, Temperature, Boolean, IEqualityOperatorsTemperature, Double, Boolean, IMinMaxValueTemperature, IMultiplyOperatorsTemperature, Double, Temperature, IMultiplyOperatorsTemperature, Int32, Temperature, ISubtractionOperatorsTemperature, Temperature, Temperature, ISubtractionOperatorsTemperature, Double, Temperature, ISubtractionOperatorsTemperature, Int32, Temperature, IUnaryNegationOperatorsTemperature, Temperature

Remarks

Since version 3.2, this class supports JSON deserialization using Newtonsoft.Json. Here is the minimal JSON document you need to deserialize correctly: { "Unit": { "$type": "InnerDrive.Quantitative.Units.Celsius, InnerDrive.Quantitative" }, "Value": 20.0 }

Constructors

Temperature(Double) Creates a new instance of Temperature with a particular value.
Temperature(Double, Unit) Creates a new instance of Temperature with a particular value and Unit.
Temperature(Double, Type) Creates a new instance of Temperature with a particular value and Unit whose Type is specified
Temperature(Double, Unit, MetricExponent)Initializes a new instance of the Temperature class

Properties

AbsoluteZero Gets a Temperature object equal to absolute zero, or 0 K.
Accuracy Represents the degree confidence that the quantity represented equals the quantity actually measured, controlling how the CompareTo<T> method behaves.
DefaultUnit Gets the Type of the Unit in which the IMeasurableclass is denominated.
MaxValueGets the maximum value of the current type.
MinValueGets the minimum value of the current type.
Name Gets the name of the type of measurement.
Precision Represents the range within which the measurement is correct, controlling how the ToString() method behaves.
Unit Gets the Unit in which the IMeasurable object is denominated.
Value Gets or sets the quantity of units represented by the IMeasurable object.

Methods

Add(Temperature, Temperature) Adds two instances of Temperature together.
Add(Temperature, Double) Adds an instance of Temperature to an instance of Double.
CloneCreates a new object that is a copy of the current instance.
CompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
ConvertTo(Type) Converts the instance into a new IMeasurable instance denominated in the measurement units provided.
ConvertTo(Unit) Converts the instance into a new instance of the same type denominated in the measurement units provided.
Divide Divides an instance of Temperature by a double-precision value.
Equals(Object)Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object))
Equals(Temperature)Indicates whether the current object is equal to another object of the same type.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FromCelsius Returns a Temperature structure equal to the Celsius value provided
FromFahrenheit Returns a Temperature structure equal to the Fahrenheit value provided
GetHashCodeReturns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Multiply Multiplies an instance of Temperature by a double-precision value.
Negate Negates the value of the specified Temperature operand.
Subtract(Temperature, Temperature) Subtracts one instance of Temperature from another.
Subtract(Temperature, Double) Subtracts an instance of Double from an instance of Temperature.
ToJson Returns a JSON representation of this Temperature
ToStringReturns the fully qualified type name of this instance.
(Overrides ValueTypeToString)
ToString(MetricExponent) Converts the numeric value of this instance to its equivalent String representation, using the metric exponent provided if appropriate to the Unit type.
ToString(String) Converts the numeric value of this instance to its equivalent String representation, using the specified format.
ToString(String, MetricExponent) Converts the numeric value of this instance to its equivalent String representation, using the specified format and metric exponent.
ToString(String, IFormatProvider)Formats the value of the current instance using the specified format.
ToString(String, MetricExponent, IFormatProvider) Formats the value of the current instance using the specified format.
TryFormatTries to format the value of the current instance into the provided span of characters.

Operators

Addition(Temperature, Temperature)Adds two values together to compute their sum.
Addition(Temperature, Double)Adds two values together to compute their sum.
Addition(Temperature, Int32)Adds two values together to compute their sum.
Division(Temperature, Double)Divides one value by another to compute their quotient.
Division(Temperature, Int32)Divides one value by another to compute their quotient.
Equality(Double, Temperature) Compares an instance of Temperature with an instance of Double for equality.
Equality(Temperature, Temperature)Compares two values to determine equality.
Equality(Temperature, Double)Compares two values to determine equality.
GreaterThan(Double, Temperature) Compares an instance of Temperature to an instance of Double for different values.
GreaterThan(Temperature, Temperature)Compares two values to determine which is greater.
GreaterThan(Temperature, Double)Compares two values to determine which is greater.
GreaterThanOrEqual(Double, Temperature) Compares an instance of Temperature to an instance of Double for different values.
GreaterThanOrEqual(Temperature, Temperature)Compares two values to determine which is greater or equal.
GreaterThanOrEqual(Temperature, Double)Compares two values to determine which is greater or equal.
(Double to Temperature) Creates a new Temperature object from a Double value.
(Temperature to Double) Creates a new Double value from a given Temperature object.
Inequality(Double, Temperature) Compares an instance of Temperature with an instance of Double for inequality.
Inequality(Temperature, Temperature)Compares two values to determine inequality.
Inequality(Temperature, Double)Compares two values to determine inequality.
LessThan(Double, Temperature) Compares an instance of Temperature to an instance of Double for different values.
LessThan(Temperature, Temperature)Compares two values to determine which is less.
LessThan(Temperature, Double)Compares two values to determine which is less.
LessThanOrEqual(Double, Temperature) Compares an instance of Temperature to an instance of Double for different values.
LessThanOrEqual(Temperature, Temperature)Compares two values to determine which is less or equal.
LessThanOrEqual(Temperature, Double)Compares two values to determine which is less or equal.
Multiply(Temperature, Double)Multiplies two values together to compute their product.
Multiply(Temperature, Int32)Multiplies two values together to compute their product.
Subtraction(Temperature, Temperature)Subtracts two values to compute their difference.
Subtraction(Temperature, Double)Subtracts two values to compute their difference.
Subtraction(Temperature, Int32)Subtracts two values to compute their difference.
UnaryNegation(Temperature)Computes the unary negation of a value.

Fields

Epsilon Represents the smallest value of Accuracy that will successfully evaluate equality without boundary condition errors.
MaxPrecision Represents the maximum precision with which a value can be displayed.
MinPrecision Represents the minimum precision with which a value can be displayed.

Explicit Interface Implementations

IComparableCompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

See Also