![]() |
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>
Inheritance diagram for supernovas::Temperature: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 | SI_unit () const override |
| std::string | to_string (int decimals=1) const override |
| Returns a human-readable string representation of this temperature value. | |
Public Member Functions inherited from supernovas::Scalar | |
| virtual | ~Scalar () |
| bool | equals (const Scalar &other, double precision) const |
| Checks if this scalar quantity is the same as another, within the specified precision. | |
| double | SI_value () const |
| The value of this scalar quantity in S.I. | |
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::Scalar | |
| Scalar () | |
| Instantiates a standard undefined (invalid) scalar quantity with NAN value. | |
| Scalar (double SI_value) | |
| Instantiates a scalar quantity with an initializing value in standard S.I. | |
Protected Member Functions inherited from supernovas::Validating | |
| Validating () | |
| dummy constructor; | |
Protected Attributes inherited from supernovas::Scalar | |
| double | _value |
| The value in S.I. units. | |
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 supernovas::Scalar::_value, and celsius().
Referenced by celsius(), celsius(), farenheit(), supernovas::Source::horizontal_track(), and to_string().
|
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 celsius(), and 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 supernovas::Scalar::_value, and 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().
|
overridevirtual |
|
overridevirtual |
Returns a human-readable string representation of this temperature value.
| decimals | (optional) [0:16] decimal places to print (default: 1). |
Reimplemented from supernovas::Scalar.
References celsius(), and to_string().
Referenced by to_string().