xo-unit: + Quantity.divide_by()
This commit is contained in:
parent
4d092dcbc2
commit
e538e61172
1 changed files with 6 additions and 0 deletions
|
|
@ -66,6 +66,12 @@ namespace xo {
|
|||
return Quantity(x * this->scale_, this->unit_);
|
||||
}
|
||||
|
||||
template <typename Dimensionless>
|
||||
requires std::is_arithmetic_v<Dimensionless>
|
||||
constexpr auto divide_by(Dimensionless x) const {
|
||||
return Quantity(this->scale_ / x, this->unit_);
|
||||
}
|
||||
|
||||
template <typename Quantity2>
|
||||
static constexpr
|
||||
auto multiply(const Quantity & x, const Quantity2 & y) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue