Physical Quantities  v1.0.0
C++ library of physical quantities, physical models, and units of measure for scientific computing. https://github.com/acodcha/phq
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | List of all members
PhQ::AngularSpeed< NumericType > Class Template Reference

Angular speed, also known as angular rate or angular frequency. Represents the time rate of change of an angle; see also PhQ::Angle, PhQ::ScalarAngularAcceleration, PhQ::Time, and PhQ::Frequency. Can also represent a component or the magnitude of an angular velocity pseudovector. More...

#include "AngularSpeed.hpp"

Public Member Functions

 AngularSpeed ()=default
 Default constructor. Constructs an angular speed with an uninitialized value. More...
 
 AngularSpeed (const NumericType value, const Unit::AngularSpeed unit)
 Constructor. Constructs an angular speed with a given value expressed in a given angular speed unit. More...
 
constexpr AngularSpeed (const Angle< NumericType > &angle, const Time< NumericType > &time)
 Constructor. Constructs an angular speed from a given angle and time using the definition of angular speed. More...
 
constexpr AngularSpeed (const Angle< NumericType > &angle, const Frequency< NumericType > &frequency)
 Constructor. Constructs an angular speed from a given angle and frequency using the definition of angular speed. More...
 
constexpr AngularSpeed (const ScalarAngularAcceleration< NumericType > &scalar_angular_acceleration, const Time< NumericType > &time)
 Constructor. Constructs an angular speed from a given scalar angular acceleration and time using the definition of angular acceleration. More...
 
constexpr AngularSpeed (const ScalarAngularAcceleration< NumericType > &scalar_angular_acceleration, const Frequency< NumericType > &frequency)
 Constructor. Constructs an angular speed from a given scalar angular acceleration and frequency using the definition of angular acceleration. More...
 
 ~AngularSpeed () noexcept=default
 Destructor. Destroys this angular speed. More...
 
constexpr AngularSpeed (const AngularSpeed< NumericType > &other)=default
 Copy constructor. Constructs an angular speed by copying another one. More...
 
template<typename OtherNumericType >
constexpr AngularSpeed (const AngularSpeed< OtherNumericType > &other)
 Copy constructor. Constructs an angular speed by copying another one. More...
 
constexpr AngularSpeed (AngularSpeed< NumericType > &&other) noexcept=default
 Move constructor. Constructs an angular speed by moving another one. More...
 
constexpr AngularSpeed< NumericType > & operator= (const AngularSpeed< NumericType > &other)=default
 Copy assignment operator. Assigns this angular speed by copying another one. More...
 
template<typename OtherNumericType >
constexpr AngularSpeed< NumericType > & operator= (const AngularSpeed< OtherNumericType > &other)
 Copy assignment operator. Assigns this angular speed by copying another one. More...
 
constexpr AngularSpeed< NumericType > & operator= (AngularSpeed< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this angular speed by moving another one. More...
 
constexpr AngularSpeed< NumericType > operator+ (const AngularSpeed< NumericType > &angular_speed) const
 
constexpr AngularSpeed< NumericType > operator- (const AngularSpeed< NumericType > &angular_speed) const
 
constexpr AngularSpeed< NumericType > operator* (const NumericType number) const
 
constexpr Angle< NumericType > operator* (const Time< NumericType > &time) const
 
constexpr ScalarAngularAcceleration< NumericType > operator* (const Frequency< NumericType > &frequency) const
 
constexpr AngularSpeed< NumericType > operator/ (const NumericType number) const
 
constexpr Angle< NumericType > operator/ (const Frequency< NumericType > &frequency) const
 
constexpr Frequency< NumericType > operator/ (const Angle< NumericType > &angle) const
 
constexpr ScalarAngularAcceleration< NumericType > operator/ (const Time< NumericType > &time) const
 
constexpr Time< NumericType > operator/ (const ScalarAngularAcceleration< NumericType > &scalar_angular_acceleration) const
 
constexpr NumericType operator/ (const AngularSpeed< NumericType > &angular_speed) const noexcept
 
constexpr void operator+= (const AngularSpeed< NumericType > &angular_speed) noexcept
 
constexpr void operator-= (const AngularSpeed< NumericType > &angular_speed) noexcept
 
constexpr void operator*= (const NumericType number) noexcept
 
constexpr void operator/= (const NumericType number) noexcept
 
constexpr double Value () const noexcept
 Value of this physical quantity expressed in its standard unit of measure. More...
 
double Value (const Unit::AngularSpeed unit) const
 Value of this physical quantity expressed in a given unit of measure. More...
 
constexpr double StaticValue () const
 Value of this physical quantity expressed in a given unit of measure. This method can be evaluated statically at compile-time. More...
 
constexpr double & MutableValue () noexcept
 Returns the value of this physical quantity expressed in its standard unit of measure as a mutable value. More...
 
constexpr void SetValue (const double value) noexcept
 Sets the value of this physical quantity expressed in its standard unit of measure to the given value. More...
 
std::string Print () const
 Prints this physical quantity as a string. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string Print (const Unit::AngularSpeed unit) const
 Prints this physical quantity as a string. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string JSON (const Unit::AngularSpeed unit) const
 Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string XML (const Unit::AngularSpeed unit) const
 Serializes this physical quantity as an XML message. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string YAML (const Unit::AngularSpeed unit) const
 Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in the given unit of measure. More...
 

Static Public Member Functions

static constexpr AngularSpeed< NumericType > Zero ()
 Statically creates an angular speed of zero. More...
 
template<Unit::AngularSpeed Unit>
static constexpr AngularSpeed< NumericType > Create (const NumericType value)
 Statically creates an angular speed with a given value expressed in a given angular speed unit. More...
 
static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr Unit::AngularSpeed Unit ()
 Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure. More...
 

Protected Attributes

double value
 Value of this physical quantity expressed in its standard unit of measure. More...
 

Private Member Functions

constexpr AngularSpeed (const NumericType value)
 Constructor. Constructs an angular speed with a given value expressed in the standard angular speed unit. More...
 

Detailed Description

template<typename NumericType = double>
class PhQ::AngularSpeed< NumericType >

Angular speed, also known as angular rate or angular frequency. Represents the time rate of change of an angle; see also PhQ::Angle, PhQ::ScalarAngularAcceleration, PhQ::Time, and PhQ::Frequency. Can also represent a component or the magnitude of an angular velocity pseudovector.

Definition at line 49 of file AngularSpeed.hpp.

Constructor & Destructor Documentation

◆ AngularSpeed() [1/10]

template<typename NumericType = double>
PhQ::AngularSpeed< NumericType >::AngularSpeed ( )
default

Default constructor. Constructs an angular speed with an uninitialized value.

◆ AngularSpeed() [2/10]

template<typename NumericType = double>
PhQ::AngularSpeed< NumericType >::AngularSpeed ( const NumericType  value,
const Unit::AngularSpeed< NumericType >  unit 
)
inline

Constructor. Constructs an angular speed with a given value expressed in a given angular speed unit.

Definition at line 56 of file AngularSpeed.hpp.

◆ AngularSpeed() [3/10]

template<typename NumericType = double>
constexpr PhQ::AngularSpeed< NumericType >::AngularSpeed ( const Angle< NumericType > &  angle,
const Time< NumericType > &  time 
)
inlineconstexpr

Constructor. Constructs an angular speed from a given angle and time using the definition of angular speed.

Definition at line 61 of file AngularSpeed.hpp.

◆ AngularSpeed() [4/10]

template<typename NumericType = double>
constexpr PhQ::AngularSpeed< NumericType >::AngularSpeed ( const Angle< NumericType > &  angle,
const Frequency< NumericType > &  frequency 
)
inlineconstexpr

Constructor. Constructs an angular speed from a given angle and frequency using the definition of angular speed.

Definition at line 66 of file AngularSpeed.hpp.

◆ AngularSpeed() [5/10]

template<typename NumericType = double>
constexpr PhQ::AngularSpeed< NumericType >::AngularSpeed ( const ScalarAngularAcceleration< NumericType > &  scalar_angular_acceleration,
const Time< NumericType > &  time 
)
constexpr

Constructor. Constructs an angular speed from a given scalar angular acceleration and time using the definition of angular acceleration.

◆ AngularSpeed() [6/10]

template<typename NumericType = double>
constexpr PhQ::AngularSpeed< NumericType >::AngularSpeed ( const ScalarAngularAcceleration< NumericType > &  scalar_angular_acceleration,
const Frequency< NumericType > &  frequency 
)
constexpr

Constructor. Constructs an angular speed from a given scalar angular acceleration and frequency using the definition of angular acceleration.

◆ ~AngularSpeed()

template<typename NumericType = double>
PhQ::AngularSpeed< NumericType >::~AngularSpeed ( )
defaultnoexcept

Destructor. Destroys this angular speed.

◆ AngularSpeed() [7/10]

template<typename NumericType = double>
constexpr PhQ::AngularSpeed< NumericType >::AngularSpeed ( const AngularSpeed< NumericType > &  other)
constexprdefault

Copy constructor. Constructs an angular speed by copying another one.

◆ AngularSpeed() [8/10]

template<typename NumericType = double>
template<typename OtherNumericType >
constexpr PhQ::AngularSpeed< NumericType >::AngularSpeed ( const AngularSpeed< OtherNumericType > &  other)
inlineexplicitconstexpr

Copy constructor. Constructs an angular speed by copying another one.

Definition at line 87 of file AngularSpeed.hpp.

◆ AngularSpeed() [9/10]

template<typename NumericType = double>
constexpr PhQ::AngularSpeed< NumericType >::AngularSpeed ( AngularSpeed< NumericType > &&  other)
constexprdefaultnoexcept

Move constructor. Constructs an angular speed by moving another one.

◆ AngularSpeed() [10/10]

template<typename NumericType = double>
constexpr PhQ::AngularSpeed< NumericType >::AngularSpeed ( const NumericType  value)
inlineexplicitconstexprprivate

Constructor. Constructs an angular speed with a given value expressed in the standard angular speed unit.

Definition at line 181 of file AngularSpeed.hpp.

Member Function Documentation

◆ Create()

template<typename NumericType = double>
template<Unit::AngularSpeed Unit>
static constexpr AngularSpeed<NumericType> PhQ::AngularSpeed< NumericType >::Create ( const NumericType  value)
inlinestaticconstexpr

Statically creates an angular speed with a given value expressed in a given angular speed unit.

Definition at line 115 of file AngularSpeed.hpp.

References PhQ::DimensionalScalar< Unit::AngularSpeed, double >::value.

◆ Dimensions()

static constexpr const PhQ::Dimensions& PhQ::DimensionalScalar< Unit::AngularSpeed , double >::Dimensions ( )
inlinestaticconstexprinherited

Physical dimension set of this physical quantity.

Definition at line 54 of file DimensionalScalar.hpp.

◆ JSON() [1/2]

std::string PhQ::DimensionalScalar< Unit::AngularSpeed , double >::JSON ( ) const
inlineinherited

Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 107 of file DimensionalScalar.hpp.

◆ JSON() [2/2]

std::string PhQ::DimensionalScalar< Unit::AngularSpeed , double >::JSON ( const Unit::AngularSpeed  unit) const
inlineinherited

Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 117 of file DimensionalScalar.hpp.

◆ MutableValue()

constexpr double & PhQ::DimensionalScalar< Unit::AngularSpeed , double >::MutableValue ( )
inlineconstexprnoexceptinherited

Returns the value of this physical quantity expressed in its standard unit of measure as a mutable value.

Definition at line 83 of file DimensionalScalar.hpp.

◆ operator*() [1/3]

template<typename NumericType = double>
constexpr ScalarAngularAcceleration<NumericType> PhQ::AngularSpeed< NumericType >::operator* ( const Frequency< NumericType > &  frequency) const
constexpr

◆ operator*() [2/3]

template<typename NumericType = double>
constexpr AngularSpeed<NumericType> PhQ::AngularSpeed< NumericType >::operator* ( const NumericType  number) const
inlineconstexpr

◆ operator*() [3/3]

template<typename NumericType = double>
constexpr Angle<NumericType> PhQ::AngularSpeed< NumericType >::operator* ( const Time< NumericType > &  time) const
inlineconstexpr

Definition at line 134 of file AngularSpeed.hpp.

◆ operator*=()

template<typename NumericType = double>
constexpr void PhQ::AngularSpeed< NumericType >::operator*= ( const NumericType  number)
inlineconstexprnoexcept

◆ operator+()

template<typename NumericType = double>
constexpr AngularSpeed<NumericType> PhQ::AngularSpeed< NumericType >::operator+ ( const AngularSpeed< NumericType > &  angular_speed) const
inlineconstexpr

◆ operator+=()

template<typename NumericType = double>
constexpr void PhQ::AngularSpeed< NumericType >::operator+= ( const AngularSpeed< NumericType > &  angular_speed)
inlineconstexprnoexcept

◆ operator-()

template<typename NumericType = double>
constexpr AngularSpeed<NumericType> PhQ::AngularSpeed< NumericType >::operator- ( const AngularSpeed< NumericType > &  angular_speed) const
inlineconstexpr

◆ operator-=()

template<typename NumericType = double>
constexpr void PhQ::AngularSpeed< NumericType >::operator-= ( const AngularSpeed< NumericType > &  angular_speed)
inlineconstexprnoexcept

◆ operator/() [1/6]

template<typename NumericType = double>
constexpr Frequency<NumericType> PhQ::AngularSpeed< NumericType >::operator/ ( const Angle< NumericType > &  angle) const
inlineconstexpr

Definition at line 149 of file AngularSpeed.hpp.

◆ operator/() [2/6]

template<typename NumericType = double>
constexpr NumericType PhQ::AngularSpeed< NumericType >::operator/ ( const AngularSpeed< NumericType > &  angular_speed) const
inlineconstexprnoexcept

◆ operator/() [3/6]

template<typename NumericType = double>
constexpr Angle<NumericType> PhQ::AngularSpeed< NumericType >::operator/ ( const Frequency< NumericType > &  frequency) const
inlineconstexpr

Definition at line 145 of file AngularSpeed.hpp.

◆ operator/() [4/6]

template<typename NumericType = double>
constexpr AngularSpeed<NumericType> PhQ::AngularSpeed< NumericType >::operator/ ( const NumericType  number) const
inlineconstexpr

◆ operator/() [5/6]

template<typename NumericType = double>
constexpr Time<NumericType> PhQ::AngularSpeed< NumericType >::operator/ ( const ScalarAngularAcceleration< NumericType > &  scalar_angular_acceleration) const
constexpr

◆ operator/() [6/6]

template<typename NumericType = double>
constexpr ScalarAngularAcceleration<NumericType> PhQ::AngularSpeed< NumericType >::operator/ ( const Time< NumericType > &  time) const
constexpr

◆ operator/=()

template<typename NumericType = double>
constexpr void PhQ::AngularSpeed< NumericType >::operator/= ( const NumericType  number)
inlineconstexprnoexcept

◆ operator=() [1/3]

template<typename NumericType = double>
constexpr AngularSpeed<NumericType>& PhQ::AngularSpeed< NumericType >::operator= ( AngularSpeed< NumericType > &&  other)
constexprdefaultnoexcept

Move assignment operator. Assigns this angular speed by moving another one.

◆ operator=() [2/3]

template<typename NumericType = double>
constexpr AngularSpeed<NumericType>& PhQ::AngularSpeed< NumericType >::operator= ( const AngularSpeed< NumericType > &  other)
constexprdefault

Copy assignment operator. Assigns this angular speed by copying another one.

◆ operator=() [3/3]

template<typename NumericType = double>
template<typename OtherNumericType >
constexpr AngularSpeed<NumericType>& PhQ::AngularSpeed< NumericType >::operator= ( const AngularSpeed< OtherNumericType > &  other)
inlineconstexpr

Copy assignment operator. Assigns this angular speed by copying another one.

Definition at line 98 of file AngularSpeed.hpp.

References PhQ::DimensionalScalar< UnitType, NumericType >::Value(), and PhQ::DimensionalScalar< Unit::AngularSpeed, double >::value.

◆ Print() [1/2]

std::string PhQ::DimensionalScalar< Unit::AngularSpeed , double >::Print ( ) const
inlineinherited

Prints this physical quantity as a string. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 95 of file DimensionalScalar.hpp.

◆ Print() [2/2]

std::string PhQ::DimensionalScalar< Unit::AngularSpeed , double >::Print ( const Unit::AngularSpeed  unit) const
inlineinherited

Prints this physical quantity as a string. This physical quantity's value is expressed in the given unit of measure.

Definition at line 101 of file DimensionalScalar.hpp.

◆ SetValue()

constexpr void PhQ::DimensionalScalar< Unit::AngularSpeed , double >::SetValue ( const double  value)
inlineconstexprnoexceptinherited

Sets the value of this physical quantity expressed in its standard unit of measure to the given value.

Definition at line 89 of file DimensionalScalar.hpp.

◆ StaticValue()

constexpr double PhQ::DimensionalScalar< Unit::AngularSpeed , double >::StaticValue ( ) const
inlineconstexprinherited

Value of this physical quantity expressed in a given unit of measure. This method can be evaluated statically at compile-time.

Definition at line 77 of file DimensionalScalar.hpp.

◆ Unit()

static constexpr Unit::AngularSpeed PhQ::DimensionalScalar< Unit::AngularSpeed , double >::Unit ( )
inlinestaticconstexprinherited

Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure.

Definition at line 60 of file DimensionalScalar.hpp.

◆ Value() [1/2]

constexpr double PhQ::DimensionalScalar< Unit::AngularSpeed , double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity expressed in its standard unit of measure.

Definition at line 65 of file DimensionalScalar.hpp.

◆ Value() [2/2]

double PhQ::DimensionalScalar< Unit::AngularSpeed , double >::Value ( const Unit::AngularSpeed  unit) const
inlineinherited

Value of this physical quantity expressed in a given unit of measure.

Definition at line 70 of file DimensionalScalar.hpp.

◆ XML() [1/2]

std::string PhQ::DimensionalScalar< Unit::AngularSpeed , double >::XML ( ) const
inlineinherited

Serializes this physical quantity as an XML message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 127 of file DimensionalScalar.hpp.

◆ XML() [2/2]

std::string PhQ::DimensionalScalar< Unit::AngularSpeed , double >::XML ( const Unit::AngularSpeed  unit) const
inlineinherited

Serializes this physical quantity as an XML message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 137 of file DimensionalScalar.hpp.

◆ YAML() [1/2]

std::string PhQ::DimensionalScalar< Unit::AngularSpeed , double >::YAML ( ) const
inlineinherited

Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 147 of file DimensionalScalar.hpp.

◆ YAML() [2/2]

std::string PhQ::DimensionalScalar< Unit::AngularSpeed , double >::YAML ( const Unit::AngularSpeed  unit) const
inlineinherited

Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 157 of file DimensionalScalar.hpp.

◆ Zero()

template<typename NumericType = double>
static constexpr AngularSpeed<NumericType> PhQ::AngularSpeed< NumericType >::Zero ( )
inlinestaticconstexpr

Statically creates an angular speed of zero.

Definition at line 108 of file AngularSpeed.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionalScalar< Unit::AngularSpeed , double >::value
protectedinherited

Value of this physical quantity expressed in its standard unit of measure.

Definition at line 221 of file DimensionalScalar.hpp.


The documentation for this class was generated from the following files: