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 | List of all members
PhQ::PlanarDirection< NumericType > Class Template Reference

two-dimensional Euclidean direction vector in the XY plane. Contains two components in Cartesian coordinates: x and y. Guaranteed to be either a unit vector or the zero vector (0, 0). For a three-dimensional Euclidean direction vector, see PhQ::Direction. More...

#include "PlanarDirection.hpp"

Public Member Functions

constexpr PlanarDirection ()
 Default constructor. Initializes a planar direction to the zero planar vector. More...
 
 PlanarDirection (const NumericType x, const NumericType y)
 Constructor. Constructs a planar direction by normalizing the given x and y Cartesian components to a unit planar vector. If x = 0 and y = 0, initializes the planar direction to the zero planar vector. More...
 
 PlanarDirection (const std::array< NumericType, 2 > &x_y)
 Constructor. Constructs a planar direction by normalizing a given array representing x and y Cartesian components to a unit planar vector. If x = 0 and y = 0, initializes the planar direction to the zero planar vector. More...
 
 PlanarDirection (const PlanarVector< NumericType > &value)
 Constructor. Constructs a planar direction by normalizing the given planar vector to a unit planar vector. If the given planar vector is the zero planar vector, initializes the planar direction to the zero planar vector. More...
 
constexpr PlanarDirection (const Direction< NumericType > &direction)
 Constructor. Constructs a planar direction from a given direction by projecting the direction onto the XY plane. More...
 
 PlanarDirection (const PlanarAcceleration< NumericType > &planar_acceleration)
 Constructor. Constructs a planar direction from a planar acceleration. More...
 
 PlanarDirection (const PlanarDisplacement< NumericType > &planar_displacement)
 Constructor. Constructs a planar direction from a planar displacement. More...
 
 PlanarDirection (const PlanarForce< NumericType > &planar_force)
 Constructor. Constructs a planar direction from a planar force. More...
 
 PlanarDirection (const PlanarHeatFlux< NumericType > &planar_heat_flux)
 Constructor. Constructs a planar direction from a planar heat flux. More...
 
 PlanarDirection (const PlanarPosition< NumericType > &planar_position)
 Constructor. Constructs a planar direction from a planar position. More...
 
 PlanarDirection (const PlanarTemperatureGradient< NumericType > &planar_temperature_gradient)
 Constructor. Constructs a planar direction from a planar temperature gradient. More...
 
 PlanarDirection (const PlanarTraction< NumericType > &planar_traction)
 Constructor. Constructs a planar direction from a planar traction. More...
 
 PlanarDirection (const PlanarVelocity< NumericType > &planar_velocity)
 Constructor. Constructs a planar direction from a planar velocity. More...
 
 ~PlanarDirection () noexcept=default
 Destructor. Destroys this planar direction. More...
 
constexpr PlanarDirection (const PlanarDirection< NumericType > &other)=default
 Copy constructor. Constructs a planar direction by copying another one. More...
 
template<typename OtherNumericType >
constexpr PlanarDirection (const PlanarDirection< OtherNumericType > &other)
 Copy constructor. Constructs a planar direction by copying another one. More...
 
constexpr PlanarDirection (PlanarDirection< NumericType > &&other) noexcept=default
 Move constructor. Constructs a planar direction by moving another one. More...
 
constexpr PlanarDirection< NumericType > & operator= (const PlanarDirection< NumericType > &other)=default
 Copy assignment operator. Assigns this planar direction by copying another one. More...
 
template<typename OtherNumericType >
constexpr PlanarDirection< NumericType > & operator= (const PlanarDirection< OtherNumericType > &other)
 Copy assignment operator. Assigns this planar direction by copying another one. More...
 
constexpr PlanarDirection< NumericType > & operator= (PlanarDirection< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns the value of this planar direction by moving another one. More...
 
constexpr NumericType x () const noexcept
 Returns the x Cartesian component of this planar direction. More...
 
constexpr NumericType y () const noexcept
 Returns the y Cartesian component of this planar direction. More...
 
constexpr void Set (const NumericType x, const NumericType y)
 Sets the value of this planar direction by normalizing the given x and y Cartesian components to a unit planar vector. If x = 0 and y = 0, sets the planar direction to the zero planar vector. More...
 
constexpr void Set (const std::array< NumericType, 2 > &x_y)
 Sets the value of this planar direction by normalizing the given x and y Cartesian components to a unit planar vector. If x = 0 and y = 0, sets the planar direction to the zero planar vector. More...
 
constexpr void Set (const PlanarVector< NumericType > &value)
 Sets the value of this planar direction by normalizing the given planar vector to a unit planar vector. If the given planar vector is the zero planar vector, sets the planar direction to the zero planar vector. More...
 
constexpr NumericType MagnitudeSquared () const noexcept
 Returns the square of the magnitude of this planar direction. This is guaranteed to be exactly 1 if the planar direction is not the zero planar vector, or 0 if the planar direction is the zero planar vector. More...
 
NumericType Magnitude () const noexcept
 Returns the magnitude of this planar direction. This is guaranteed to be exactly 1 if the planar direction is not the zero planar vector, or 0 if the planar direction is the zero planar vector. More...
 
constexpr NumericType Dot (const PlanarVector< NumericType > &planar_vector) const noexcept
 Returns the dot product (also known as the scalar product or the inner product) of this planar direction with the given planar vector. More...
 
constexpr NumericType Dot (const PlanarDirection< NumericType > &planar_direction) const noexcept
 Returns the dot product (also known as the scalar product or the inner product) of this planar direction with the given other planar direction. More...
 
constexpr Vector< NumericType > Cross (const PlanarVector< NumericType > &planar_vector) const
 Returns the cross product of this planar direction with the given planar vector. More...
 
Direction< NumericType > Cross (const PlanarDirection< NumericType > &planar_direction) const
 Returns the cross product of this planar direction with the given other planar direction. More...
 
constexpr Dyad< NumericType > Dyadic (const PlanarVector< NumericType > &planar_vector) const
 Returns the dyadic product of this planar direction with the given planar vector. More...
 
constexpr Dyad< NumericType > Dyadic (const PlanarDirection< NumericType > &planar_direction) const
 Returns the dyadic product of this planar direction with the given other planar direction. More...
 
PhQ::Angle< NumericType > Angle (const PlanarVector< NumericType > &planar_vector) const
 Returns the angle between this planar direction and the given planar vector. More...
 
PhQ::Angle< NumericType > Angle (const PlanarDirection< NumericType > &planar_direction) const
 Returns the angle between this planar direction and the given other planar direction. More...
 
constexpr PlanarAcceleration< NumericType > operator* (const ScalarAcceleration< NumericType > &scalar_acceleration) const
 
constexpr PlanarPosition< NumericType > operator* (const Length< NumericType > &length) const
 
constexpr PlanarForce< NumericType > operator* (const ScalarForce< NumericType > &scalar_force) const
 
constexpr PlanarHeatFlux< NumericType > operator* (const ScalarHeatFlux< NumericType > &scalar_heat_flux) const
 
constexpr PlanarTemperatureGradient< NumericType > operator* (const ScalarTemperatureGradient< NumericType > &scalar_temperature_gradient) const
 
constexpr PlanarTraction< NumericType > operator* (const ScalarTraction< NumericType > &scalar_traction) const
 
constexpr PlanarVelocity< NumericType > operator* (const Speed< NumericType > &speed) const
 
constexpr const PhQ::PlanarVector< double > & Value () const noexcept
 Value of this physical quantity. More...
 
std::string Print () const
 Prints this physical quantity as a string. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. More...
 

Static Public Member Functions

static constexpr PlanarDirection< NumericType > Zero ()
 Statically creates a planar direction whose value is the zero vector. More...
 
static constexpr PhQ::Dimensions Dimensions ()
 Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set. More...
 

Protected Attributes

PhQ::PlanarVector< double > value
 Value of this physical quantity. More...
 

Detailed Description

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

two-dimensional Euclidean direction vector in the XY plane. Contains two components in Cartesian coordinates: x and y. Guaranteed to be either a unit vector or the zero vector (0, 0). For a three-dimensional Euclidean direction vector, see PhQ::Direction.

Definition at line 111 of file PlanarDirection.hpp.

Constructor & Destructor Documentation

◆ PlanarDirection() [1/16]

template<typename NumericType = double>
constexpr PhQ::PlanarDirection< NumericType >::PlanarDirection ( )
inlineconstexpr

Default constructor. Initializes a planar direction to the zero planar vector.

Definition at line 114 of file PlanarDirection.hpp.

◆ PlanarDirection() [2/16]

template<typename NumericType = double>
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const NumericType  x,
const NumericType  y 
)
inline

Constructor. Constructs a planar direction by normalizing the given x and y Cartesian components to a unit planar vector. If x = 0 and y = 0, initializes the planar direction to the zero planar vector.

Definition at line 120 of file PlanarDirection.hpp.

References PhQ::PlanarDirection< NumericType >::Set(), PhQ::PlanarDirection< NumericType >::x(), and PhQ::PlanarDirection< NumericType >::y().

◆ PlanarDirection() [3/16]

template<typename NumericType = double>
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const std::array< NumericType, 2 > &  x_y)
inlineexplicit

Constructor. Constructs a planar direction by normalizing a given array representing x and y Cartesian components to a unit planar vector. If x = 0 and y = 0, initializes the planar direction to the zero planar vector.

Definition at line 128 of file PlanarDirection.hpp.

References PhQ::PlanarDirection< NumericType >::Set().

◆ PlanarDirection() [4/16]

template<typename NumericType = double>
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarVector< NumericType > &  value)
inlineexplicit

Constructor. Constructs a planar direction by normalizing the given planar vector to a unit planar vector. If the given planar vector is the zero planar vector, initializes the planar direction to the zero planar vector.

Definition at line 136 of file PlanarDirection.hpp.

References PhQ::PlanarDirection< NumericType >::Set(), and PhQ::DimensionlessPlanarVector< double >::value.

◆ PlanarDirection() [5/16]

template<typename NumericType >
constexpr PhQ::PlanarDirection< NumericType >::PlanarDirection ( const Direction< NumericType > &  direction)
inlineexplicitconstexpr

Constructor. Constructs a planar direction from a given direction by projecting the direction onto the XY plane.

Definition at line 433 of file Direction.hpp.

References PhQ::DimensionlessVector< NumericType >::Value().

◆ PlanarDirection() [6/16]

template<typename NumericType >
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarAcceleration< NumericType > &  planar_acceleration)
inlineexplicit

Constructor. Constructs a planar direction from a planar acceleration.

Definition at line 277 of file PlanarAcceleration.hpp.

◆ PlanarDirection() [7/16]

template<typename NumericType >
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarDisplacement< NumericType > &  planar_displacement)
inlineexplicit

Constructor. Constructs a planar direction from a planar displacement.

Definition at line 306 of file PlanarDisplacement.hpp.

◆ PlanarDirection() [8/16]

template<typename NumericType >
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarForce< NumericType > &  planar_force)
inlineexplicit

Constructor. Constructs a planar direction from a planar force.

Definition at line 256 of file PlanarForce.hpp.

◆ PlanarDirection() [9/16]

template<typename NumericType >
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarHeatFlux< NumericType > &  planar_heat_flux)
inlineexplicit

Constructor. Constructs a planar direction from a planar heat flux.

Definition at line 274 of file PlanarHeatFlux.hpp.

◆ PlanarDirection() [10/16]

template<typename NumericType >
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarPosition< NumericType > &  planar_position)
inlineexplicit

Constructor. Constructs a planar direction from a planar position.

Definition at line 279 of file PlanarPosition.hpp.

◆ PlanarDirection() [11/16]

template<typename NumericType >
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarTemperatureGradient< NumericType > &  planar_temperature_gradient)
inlineexplicit

Constructor. Constructs a planar direction from a planar temperature gradient.

Definition at line 274 of file PlanarTemperatureGradient.hpp.

◆ PlanarDirection() [12/16]

template<typename NumericType >
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarTraction< NumericType > &  planar_traction)
inlineexplicit

Constructor. Constructs a planar direction from a planar traction.

Definition at line 273 of file PlanarTraction.hpp.

◆ PlanarDirection() [13/16]

template<typename NumericType >
PhQ::PlanarDirection< NumericType >::PlanarDirection ( const PlanarVelocity< NumericType > &  planar_velocity)
inlineexplicit

Constructor. Constructs a planar direction from a planar velocity.

Definition at line 292 of file PlanarVelocity.hpp.

◆ ~PlanarDirection()

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

Destructor. Destroys this planar direction.

◆ PlanarDirection() [14/16]

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

Copy constructor. Constructs a planar direction by copying another one.

◆ PlanarDirection() [15/16]

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

Copy constructor. Constructs a planar direction by copying another one.

Definition at line 178 of file PlanarDirection.hpp.

◆ PlanarDirection() [16/16]

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

Move constructor. Constructs a planar direction by moving another one.

Member Function Documentation

◆ Angle() [1/2]

template<typename NumericType = double>
PhQ::Angle<NumericType> PhQ::PlanarDirection< NumericType >::Angle ( const PlanarDirection< NumericType > &  planar_direction) const
inline

Returns the angle between this planar direction and the given other planar direction.

Definition at line 308 of file PlanarDirection.hpp.

◆ Angle() [2/2]

template<typename NumericType = double>
PhQ::Angle<NumericType> PhQ::PlanarDirection< NumericType >::Angle ( const PlanarVector< NumericType > &  planar_vector) const
inline

Returns the angle between this planar direction and the given planar vector.

Definition at line 302 of file PlanarDirection.hpp.

◆ Cross() [1/2]

template<typename NumericType >
Direction< NumericType > PhQ::PlanarDirection< NumericType >::Cross ( const PlanarDirection< NumericType > &  planar_direction) const

Returns the cross product of this planar direction with the given other planar direction.

Definition at line 438 of file Direction.hpp.

References PhQ::Direction< NumericType >::Cross(), and PhQ::DimensionlessPlanarVector< NumericType >::value.

◆ Cross() [2/2]

template<typename NumericType = double>
constexpr Vector<NumericType> PhQ::PlanarDirection< NumericType >::Cross ( const PlanarVector< NumericType > &  planar_vector) const
inlineconstexpr

Returns the cross product of this planar direction with the given planar vector.

Definition at line 278 of file PlanarDirection.hpp.

References PhQ::PlanarVector< NumericType >::Cross(), and PhQ::DimensionlessPlanarVector< double >::value.

◆ Dimensions()

static constexpr PhQ::Dimensions PhQ::DimensionlessPlanarVector< double >::Dimensions ( )
inlinestaticconstexprinherited

Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set.

Definition at line 55 of file DimensionlessPlanarVector.hpp.

◆ Dot() [1/2]

template<typename NumericType = double>
constexpr NumericType PhQ::PlanarDirection< NumericType >::Dot ( const PlanarDirection< NumericType > &  planar_direction) const
inlineconstexprnoexcept

Returns the dot product (also known as the scalar product or the inner product) of this planar direction with the given other planar direction.

Definition at line 272 of file PlanarDirection.hpp.

References PhQ::PlanarVector< NumericType >::Dot(), and PhQ::DimensionlessPlanarVector< double >::value.

◆ Dot() [2/2]

template<typename NumericType = double>
constexpr NumericType PhQ::PlanarDirection< NumericType >::Dot ( const PlanarVector< NumericType > &  planar_vector) const
inlineconstexprnoexcept

Returns the dot product (also known as the scalar product or the inner product) of this planar direction with the given planar vector.

Definition at line 265 of file PlanarDirection.hpp.

References PhQ::PlanarVector< NumericType >::Dot(), and PhQ::DimensionlessPlanarVector< double >::value.

◆ Dyadic() [1/2]

template<typename NumericType = double>
constexpr Dyad<NumericType> PhQ::PlanarDirection< NumericType >::Dyadic ( const PlanarDirection< NumericType > &  planar_direction) const
inlineconstexpr

Returns the dyadic product of this planar direction with the given other planar direction.

Definition at line 296 of file PlanarDirection.hpp.

References PhQ::PlanarVector< NumericType >::Dyadic(), PhQ::DimensionlessPlanarVector< NumericType >::value, and PhQ::DimensionlessPlanarVector< double >::value.

◆ Dyadic() [2/2]

template<typename NumericType = double>
constexpr Dyad<NumericType> PhQ::PlanarDirection< NumericType >::Dyadic ( const PlanarVector< NumericType > &  planar_vector) const
inlineconstexpr

Returns the dyadic product of this planar direction with the given planar vector.

Definition at line 289 of file PlanarDirection.hpp.

References PhQ::PlanarVector< NumericType >::Dyadic(), and PhQ::DimensionlessPlanarVector< double >::value.

◆ JSON()

std::string PhQ::DimensionlessPlanarVector< double >::JSON ( ) const
inlineinherited

Serializes this physical quantity as a JSON message.

Definition at line 70 of file DimensionlessPlanarVector.hpp.

◆ Magnitude()

template<typename NumericType = double>
NumericType PhQ::PlanarDirection< NumericType >::Magnitude ( ) const
inlinenoexcept

Returns the magnitude of this planar direction. This is guaranteed to be exactly 1 if the planar direction is not the zero planar vector, or 0 if the planar direction is the zero planar vector.

Definition at line 259 of file PlanarDirection.hpp.

References PhQ::PlanarVector< NumericType >::Magnitude(), and PhQ::DimensionlessPlanarVector< double >::value.

◆ MagnitudeSquared()

template<typename NumericType = double>
constexpr NumericType PhQ::PlanarDirection< NumericType >::MagnitudeSquared ( ) const
inlineconstexprnoexcept

Returns the square of the magnitude of this planar direction. This is guaranteed to be exactly 1 if the planar direction is not the zero planar vector, or 0 if the planar direction is the zero planar vector.

Definition at line 252 of file PlanarDirection.hpp.

References PhQ::PlanarVector< NumericType >::MagnitudeSquared(), and PhQ::DimensionlessPlanarVector< double >::value.

◆ operator*() [1/7]

template<typename NumericType >
constexpr PlanarPosition< NumericType > PhQ::PlanarDirection< NumericType >::operator* ( const Length< NumericType > &  length) const
inlineconstexpr

Definition at line 306 of file PlanarPosition.hpp.

◆ operator*() [2/7]

template<typename NumericType >
constexpr PlanarAcceleration< NumericType > PhQ::PlanarDirection< NumericType >::operator* ( const ScalarAcceleration< NumericType > &  scalar_acceleration) const
inlineconstexpr

Definition at line 298 of file PlanarAcceleration.hpp.

◆ operator*() [3/7]

template<typename NumericType >
constexpr PlanarForce< NumericType > PhQ::PlanarDirection< NumericType >::operator* ( const ScalarForce< NumericType > &  scalar_force) const
inlineconstexpr

Definition at line 265 of file PlanarForce.hpp.

◆ operator*() [4/7]

template<typename NumericType >
constexpr PlanarHeatFlux< NumericType > PhQ::PlanarDirection< NumericType >::operator* ( const ScalarHeatFlux< NumericType > &  scalar_heat_flux) const
inlineconstexpr

Definition at line 284 of file PlanarHeatFlux.hpp.

◆ operator*() [5/7]

template<typename NumericType >
constexpr PlanarTemperatureGradient< NumericType > PhQ::PlanarDirection< NumericType >::operator* ( const ScalarTemperatureGradient< NumericType > &  scalar_temperature_gradient) const
inlineconstexpr

Definition at line 286 of file PlanarTemperatureGradient.hpp.

◆ operator*() [6/7]

template<typename NumericType >
constexpr PlanarTraction< NumericType > PhQ::PlanarDirection< NumericType >::operator* ( const ScalarTraction< NumericType > &  scalar_traction) const
inlineconstexpr

Definition at line 288 of file PlanarTraction.hpp.

◆ operator*() [7/7]

template<typename NumericType >
constexpr PlanarVelocity< NumericType > PhQ::PlanarDirection< NumericType >::operator* ( const Speed< NumericType > &  speed) const
inlineconstexpr

Definition at line 312 of file PlanarVelocity.hpp.

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this planar direction by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this planar direction by copying another one.

Definition at line 190 of file PlanarDirection.hpp.

References PhQ::DimensionlessPlanarVector< NumericType >::Value(), and PhQ::DimensionlessPlanarVector< double >::value.

◆ operator=() [3/3]

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

Move assignment operator. Assigns the value of this planar direction by moving another one.

◆ Print()

std::string PhQ::DimensionlessPlanarVector< double >::Print ( ) const
inlineinherited

Prints this physical quantity as a string.

Definition at line 65 of file DimensionlessPlanarVector.hpp.

◆ Set() [1/3]

template<typename NumericType = double>
constexpr void PhQ::PlanarDirection< NumericType >::Set ( const NumericType  x,
const NumericType  y 
)
inlineconstexpr

Sets the value of this planar direction by normalizing the given x and y Cartesian components to a unit planar vector. If x = 0 and y = 0, sets the planar direction to the zero planar vector.

Definition at line 219 of file PlanarDirection.hpp.

References PhQ::PlanarDirection< NumericType >::x(), and PhQ::PlanarDirection< NumericType >::y().

Referenced by PhQ::PlanarDirection< NumericType >::PlanarDirection(), and PhQ::PlanarDirection< NumericType >::Set().

◆ Set() [2/3]

template<typename NumericType = double>
constexpr void PhQ::PlanarDirection< NumericType >::Set ( const PlanarVector< NumericType > &  value)
inlineconstexpr

Sets the value of this planar direction by normalizing the given planar vector to a unit planar vector. If the given planar vector is the zero planar vector, sets the planar direction to the zero planar vector.

Definition at line 245 of file PlanarDirection.hpp.

References PhQ::PlanarDirection< NumericType >::Set(), PhQ::DimensionlessPlanarVector< double >::value, and PhQ::PlanarVector< NumericType >::x_y().

◆ Set() [3/3]

template<typename NumericType = double>
constexpr void PhQ::PlanarDirection< NumericType >::Set ( const std::array< NumericType, 2 > &  x_y)
inlineconstexpr

Sets the value of this planar direction by normalizing the given x and y Cartesian components to a unit planar vector. If x = 0 and y = 0, sets the planar direction to the zero planar vector.

Definition at line 232 of file PlanarDirection.hpp.

◆ Value()

constexpr const PhQ::PlanarVector<double >& PhQ::DimensionlessPlanarVector< double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity.

Definition at line 60 of file DimensionlessPlanarVector.hpp.

◆ x()

template<typename NumericType = double>
constexpr NumericType PhQ::PlanarDirection< NumericType >::x ( ) const
inlineconstexprnoexcept

◆ XML()

std::string PhQ::DimensionlessPlanarVector< double >::XML ( ) const
inlineinherited

Serializes this physical quantity as an XML message.

Definition at line 75 of file DimensionlessPlanarVector.hpp.

◆ y()

template<typename NumericType = double>
constexpr NumericType PhQ::PlanarDirection< NumericType >::y ( ) const
inlineconstexprnoexcept

Returns the y Cartesian component of this planar direction.

Definition at line 212 of file PlanarDirection.hpp.

Referenced by PhQ::PlanarDirection< NumericType >::PlanarDirection(), and PhQ::PlanarDirection< NumericType >::Set().

◆ YAML()

std::string PhQ::DimensionlessPlanarVector< double >::YAML ( ) const
inlineinherited

Serializes this physical quantity as a YAML message.

Definition at line 80 of file DimensionlessPlanarVector.hpp.

◆ Zero()

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

Statically creates a planar direction whose value is the zero vector.

Definition at line 202 of file PlanarDirection.hpp.

Member Data Documentation

◆ value

PhQ::PlanarVector<double > PhQ::DimensionlessPlanarVector< double >::value
protectedinherited

Value of this physical quantity.

Definition at line 147 of file DimensionlessPlanarVector.hpp.


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