Program Listing for File Jerk.hpp
↰ Return to documentation for file (src/LouLib/Units/Jerk.hpp
)
#ifndef LOULIB_JERK_HPP
#define LOULIB_JERK_HPP
#include "BaseUnit.hpp"
#include "UnitMath.hpp"
#include "Length.hpp"
#include "Time.hpp"
namespace LouLib {
namespace Units {
DEFINE_NEW_UNIT(1, 0, -3, 0, 0, 0, 0, 0, Jerk);
constexpr Jerk METER_PER_SECOND_CUBED = METER / (SECOND*SECOND*SECOND);
inline namespace literals{
#define CREATE_JERK_STRING_LITERAL(literal, unit) \
constexpr Jerk operator"" literal(long double x){ \
return static_cast<double>(x)*unit; \
} \
constexpr Jerk operator"" literal(unsigned long long int x){ \
return static_cast<double>(x)*unit; \
}
CREATE_JERK_STRING_LITERAL(_mps3, METER_PER_SECOND_CUBED);
}
}
}
#endif //LOULIB_JERK_HPP