![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
A physical temperature value, which can be instantiated, and then expressed, in different commonly used temperature units (C, K, or F). More...
#include <supernovas.h>
Public Member Functions | |
| double | celsius () const |
| Returns the temperature value in degrees Celsius. | |
| double | farenheit () const |
| Returns the temperature value in degrees Farenheit. | |
| double | kelvin () const |
| Returns the temperature value in degrees Kelvin. | |
| std::string | to_string () const |
| Returns a human-readable string representation of this temperature value. | |
| Public Member Functions inherited from supernovas::Validating | |
| bool | is_valid () const |
| Returns the previously set 'valid' stae of the implementing instance. | |
| operator bool () const | |
| Objects that implement Validating can be used in conditionals directly, without explicitly calling is_valid(). | |
Static Public Member Functions | |
| static Temperature | celsius (double value) |
| Returns a new temperature object, with the specified temperature value defined in degrees Celsius. | |
| static Temperature | farenheit (double value) |
| Returns a new temperature object, with the specified temperature value defined in degrees Farenheit. | |
| static Temperature | kelvin (double value) |
| Returns a new temperature object, with the specified temperature value defined in degrees Kelvin. | |
Additional Inherited Members | |
| Protected Member Functions inherited from supernovas::Validating | |
| Validating () | |
| dummy constructor; | |
| Protected Attributes inherited from supernovas::Validating | |
| bool | _valid = false |
| the state variable. | |
A physical temperature value, which can be instantiated, and then expressed, in different commonly used temperature units (C, K, or F).
Within SuperNOVAS it is normally used to express ambient temperatures at an observing location, but users may utilize it in any other context also.
| double supernovas::Temperature::celsius | ( | ) | const |
Returns the temperature value in degrees Celsius.
References celsius().
Referenced by celsius(), celsius(), and supernovas::Source::horizontal_track().
|
static |
Returns a new temperature object, with the specified temperature value defined in degrees Celsius.
| value | [C] temperature value |
References celsius(), and supernovas::Validating::is_valid().
| double supernovas::Temperature::farenheit | ( | ) | const |
Returns the temperature value in degrees Farenheit.
References farenheit().
Referenced by farenheit(), and farenheit().
|
static |
Returns a new temperature object, with the specified temperature value defined in degrees Farenheit.
| value | [F] temperature value |
References farenheit(), and supernovas::Validating::is_valid().
| double supernovas::Temperature::kelvin | ( | ) | const |
Returns the temperature value in degrees Kelvin.
References kelvin().
|
static |
Returns a new temperature object, with the specified temperature value defined in degrees Kelvin.
| value | [K] temperature value |
References supernovas::Validating::is_valid(), and kelvin().
| std::string supernovas::Temperature::to_string | ( | ) | const |
Returns a human-readable string representation of this temperature value.
References to_string().
Referenced by to_string().