17#ifndef IGNITION_MATH_TEMPERATURE_HH_
18#define IGNITION_MATH_TEMPERATURE_HH_
23#include <ignition/math/config.hh>
30 inline namespace IGNITION_MATH_VERSION_NAMESPACE
33 class TemperaturePrivate;
169 return _t + _temp.
Kelvin();
198 return _t - _temp.
Kelvin();
227 return _t * _temp.
Kelvin();
256 return _t / _temp.
Kelvin();
355 _in.setf(std::ios_base::skipws);
368#pragma warning(disable: 4251)
371 private: std::unique_ptr<TemperaturePrivate> dataPtr;
A class that stores temperature information, and allows conversion between different units.
Definition Temperature.hh:68
const Temperature & operator+=(const Temperature &_temp)
Addition assignment operator.
friend Temperature operator/(double _t, const Temperature &_temp)
Division operator for double type.
Definition Temperature.hh:254
void SetFahrenheit(const double _temp)
Set the temperature from a Fahrenheit value.
Temperature()
Default constructor.
double Kelvin() const
Get the temperature in Kelvin.
const Temperature & operator+=(const double _temp)
Addition assignment operator.
Temperature operator-(const double _temp)
Subtraction operator.
Temperature operator-(const Temperature &_temp)
Subtraction operator.
static double FahrenheitToKelvin(const double _temp)
Convert Fahrenheit to Kelvin.
bool operator==(const Temperature &_temp) const
Equal to operator.
Temperature(const Temperature &_temp)
Copy constructor.
bool operator!=(const Temperature &_temp) const
Inequality to operator.
const Temperature & operator/=(const Temperature &_temp)
Division assignment operator.
bool operator==(const double _temp) const
Equal to operator, where the value of _temp is assumed to be in Kelvin.
bool operator>=(const double _temp) const
Greater than equal operator, where the value of _temp is assumed to be in Kelvin.
friend std::istream & operator>>(std::istream &_in, ignition::math::Temperature &_temp)
Stream extraction operator.
Definition Temperature.hh:351
const Temperature & operator-=(const Temperature &_temp)
Subtraction assignment operator.
friend Temperature operator*(double _t, const Temperature &_temp)
Multiplication operator for double type.
Definition Temperature.hh:225
friend std::ostream & operator<<(std::ostream &_out, const ignition::math::Temperature &_temp)
Stream insertion operator.
Definition Temperature.hh:339
Temperature operator*(const double _temp)
Multiplication operator.
Temperature & operator=(const double _temp)
Assignment operator.
friend Temperature operator+(double _t, const Temperature &_temp)
Addition operator for double type.
Definition Temperature.hh:167
bool operator<=(const double _temp) const
Less than or equal operator, where the value of _temp is assumed to be in Kelvin.
bool operator>=(const Temperature &_temp) const
Greater than or equal to operator.
Temperature operator+(const double _temp)
Addition operator.
Temperature operator+(const Temperature &_temp)
Addition operator.
const Temperature & operator-=(const double _temp)
Subtraction assignment operator.
const Temperature & operator*=(const double _temp)
Multiplication assignment operator.
const Temperature & operator/=(const double _temp)
Division assignment operator.
Temperature operator/(const Temperature &_temp)
Division operator.
bool operator<=(const Temperature &_temp) const
Less than or equal to operator.
static double KelvinToFahrenheit(const double _temp)
Convert Kelvin to Fahrenheit.
Temperature operator/(const double _temp)
Division operator.
void SetCelsius(const double _temp)
Set the temperature from a Celsius value.
const Temperature & operator*=(const Temperature &_temp)
Multiplication assignment operator.
bool operator<(const double _temp) const
Less than operator, where the value of _temp is assumed to be in Kelvin.
static double CelsiusToFahrenheit(const double _temp)
Convert Celsius to Fahrenheit.
void SetKelvin(const double _temp)
Set the temperature from a Kelvin value.
Temperature operator*(const Temperature &_temp)
Multiplication operator.
friend Temperature operator-(double _t, const Temperature &_temp)
Subtraction operator for double type.
Definition Temperature.hh:196
Temperature & operator=(const Temperature &_temp)
Assignment operator.
double operator()() const
Accessor operator.
virtual ~Temperature()
Destructor.
bool operator>(const Temperature &_temp) const
Greater than operator.
Temperature(const double _temp)
Kelvin value constructor.
bool operator>(const double _temp) const
Greater than operator, where the value of _temp is assumed to be in Kelvin.
static double FahrenheitToCelsius(const double _temp)
Convert Fahrenheit to Celsius.
bool operator!=(const double _temp) const
Inequality to operator, where the value of _temp is assumed to be in Kelvin.
static double CelsiusToKelvin(const double _temp)
Convert Celsius to Kelvin.
bool operator<(const Temperature &_temp) const
Less than to operator.
double Celsius() const
Get the temperature in Celsius.
static double KelvinToCelsius(const double _temp)
Convert Kelvin to Celsius.
double Fahrenheit() const
Get the temperature in Fahrenheit.