Go to the documentation of this file.
25 #include "spdlog/fmt/ostr.h"
26 #include "spdlog/spdlog.h"
39 #define AD_PHYSICS_ANGULARACCELERATION_THROWS_EXCEPTION 1
41 #if SAFE_DATATYPES_EXPLICIT_CONVERSION
45 #define _AD_PHYSICS_ANGULARACCELERATION_EXPLICIT_CONVERSION_ explicit
50 #define _AD_PHYSICS_ANGULARACCELERATION_EXPLICIT_CONVERSION_
85 : mAngularAcceleration(std::numeric_limits<double>::quiet_NaN())
96 : mAngularAcceleration(iAngularAcceleration)
139 return std::fabs(mAngularAcceleration - other.mAngularAcceleration) <
cPrecisionValue;
167 return (mAngularAcceleration > other.mAngularAcceleration) &&
operator!=(other);
183 return (mAngularAcceleration < other.mAngularAcceleration) &&
operator!=(other);
199 return ((mAngularAcceleration > other.mAngularAcceleration) ||
operator==(other));
215 return ((mAngularAcceleration < other.mAngularAcceleration) ||
operator==(other));
251 mAngularAcceleration += other.mAngularAcceleration;
289 mAngularAcceleration -= other.mAngularAcceleration;
345 double const result = mAngularAcceleration / other.mAngularAcceleration;
373 return mAngularAcceleration;
385 auto const valueClass = std::fpclassify(mAngularAcceleration);
386 return ((valueClass == FP_NORMAL) || (valueClass == FP_ZERO)) && (
cMinValue <= mAngularAcceleration)
400 spdlog::info(
"ensureValid(::ad::physics::AngularAcceleration)>> {} value out of range",
402 #if (AD_PHYSICS_ANGULARACCELERATION_THROWS_EXCEPTION == 1)
403 throw std::out_of_range(
"AngularAcceleration value out of range");
419 spdlog::info(
"ensureValid(::ad::physics::AngularAcceleration)>> {} value is zero", *
this);
420 #if (AD_PHYSICS_ANGULARACCELERATION_THROWS_EXCEPTION == 1)
421 throw std::out_of_range(
"AngularAcceleration value is zero");
454 double mAngularAcceleration;
470 inline ::ad::physics::AngularAcceleration
operator*(
const double &other,
473 return value.operator*(other);
484 inline ::ad::physics::AngularAcceleration
fabs(const ::ad::physics::AngularAcceleration other)
504 static inline ::ad::physics::AngularAcceleration
lowest()
506 return ::ad::physics::AngularAcceleration::getMin();
511 static inline ::ad::physics::AngularAcceleration
max()
513 return ::ad::physics::AngularAcceleration::getMax();
519 static inline ::ad::physics::AngularAcceleration
epsilon()
521 return ::ad::physics::AngularAcceleration::getPrecision();
530 #ifndef GEN_GUARD_AD_PHYSICS_ANGULARACCELERATION
531 #define GEN_GUARD_AD_PHYSICS_ANGULARACCELERATION
552 return os << double(_value);
564 return to_string(
static_cast<double>(value));
567 #endif // GEN_GUARD_AD_PHYSICS_ANGULARACCELERATION
namespace ad
Definition: Acceleration.hpp:30
static const double cMaxValue
constant defining the maximum valid AngularAcceleration value (used in isValid())
Definition: AngularAcceleration.hpp:70
bool operator!=(const AngularAcceleration &other) const
standard comparison operator
Definition: AngularAcceleration.hpp:149
void ensureValidNonZero() const
ensure that the AngularAcceleration is valid and non zero
Definition: AngularAcceleration.hpp:414
void ensureValid() const
ensure that the AngularAcceleration is valid
Definition: AngularAcceleration.hpp:396
AngularAcceleration operator/(const double &scalar) const
standard arithmetic operator
Definition: AngularAcceleration.hpp:322
static inline ::ad::physics::AngularAcceleration lowest()
Definition: AngularAcceleration.hpp:504
double operator/(const AngularAcceleration &other) const
standard arithmetic operator
Definition: AngularAcceleration.hpp:341
static inline ::ad::physics::AngularAcceleration max()
Definition: AngularAcceleration.hpp:511
AngularAcceleration operator+(const AngularAcceleration &other) const
standard arithmetic operator
Definition: AngularAcceleration.hpp:228
static const double cPrecisionValue
constant defining the assumed AngularAcceleration value accuracy (used in comparison operator==(),...
Definition: AngularAcceleration.hpp:76
DataType AngularAcceleration.
Definition: AngularAcceleration.hpp:59
AngularAcceleration operator-=(const AngularAcceleration &other)
standard arithmetic operator
Definition: AngularAcceleration.hpp:285
bool operator>=(const AngularAcceleration &other) const
standard comparison operator
Definition: AngularAcceleration.hpp:195
static AngularAcceleration getMax()
get maximum valid AngularAcceleration (i.e. cMaxValue)
Definition: AngularAcceleration.hpp:437
AngularAcceleration()
default constructor
Definition: AngularAcceleration.hpp:84
static inline ::ad::physics::AngularAcceleration epsilon()
Definition: AngularAcceleration.hpp:519
static AngularAcceleration getPrecision()
get assumed accuracy of AngularAcceleration (i.e. cPrecisionValue)
Definition: AngularAcceleration.hpp:445
bool operator>(const AngularAcceleration &other) const
standard comparison operator
Definition: AngularAcceleration.hpp:163
AngularAcceleration & operator+=(const AngularAcceleration &other)
standard arithmetic operator
Definition: AngularAcceleration.hpp:247
_AD_PHYSICS_ANGULARACCELERATION_EXPLICIT_CONVERSION_ AngularAcceleration(double const iAngularAcceleration)
standard constructor
Definition: AngularAcceleration.hpp:95
inline ::ad::physics::AngularAcceleration operator*(const double &other, ::ad::physics::AngularAcceleration const &value)
standard arithmetic operator
Definition: AngularAcceleration.hpp:470
static const double cMinValue
constant defining the minimum valid AngularAcceleration value (used in isValid())
Definition: AngularAcceleration.hpp:65
AngularAcceleration operator*(const double &scalar) const
standard arithmetic operator
Definition: AngularAcceleration.hpp:304
inline ::ad::physics::Weight fabs(const ::ad::physics::Weight other)
overload of the std::fabs for Weight
Definition: Weight.hpp:480
inline ::ad::physics::Acceleration fabs(const ::ad::physics::Acceleration other)
overload of the std::fabs for Acceleration
Definition: Acceleration.hpp:481
std::string to_string(::ad::physics::Acceleration const &value)
overload of the std::to_string for Acceleration
Definition: Acceleration.hpp:559
AngularAcceleration operator-(const AngularAcceleration &other) const
standard arithmetic operator
Definition: AngularAcceleration.hpp:266
static AngularAcceleration getMin()
get minimum valid AngularAcceleration (i.e. cMinValue)
Definition: AngularAcceleration.hpp:429
bool operator==(const AngularAcceleration &other) const
standard comparison operator
Definition: AngularAcceleration.hpp:135
bool operator<(const AngularAcceleration &other) const
standard comparison operator
Definition: AngularAcceleration.hpp:179
AngularAcceleration & operator=(const AngularAcceleration &other)=default
standard assignment operator
std::ostream & operator<<(std::ostream &os, Acceleration const &_value)
standard ostream operator
Definition: Acceleration.hpp:547
bool operator<=(const AngularAcceleration &other) const
standard comparison operator
Definition: AngularAcceleration.hpp:211
bool isValid() const
Definition: AngularAcceleration.hpp:383
AngularAcceleration operator-() const
standard arithmetic operator
Definition: AngularAcceleration.hpp:357
#define _AD_PHYSICS_ANGULARACCELERATION_EXPLICIT_CONVERSION_
Enable/Disable explicit conversion. Currently set to "implicit conversion allowed".
Definition: AngularAcceleration.hpp:50