mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
refactor(example): avg_speed
example don't need a quantity_cast
anymore
This commit is contained in:
@@ -45,7 +45,7 @@ constexpr quantity<si::metre / si::second> fixed_double_si_avg_speed(quantity<si
|
|||||||
|
|
||||||
constexpr QuantityOf<isq::speed> auto avg_speed(QuantityOf<isq::length> auto d, QuantityOf<isq::time> auto t)
|
constexpr QuantityOf<isq::speed> auto avg_speed(QuantityOf<isq::length> auto d, QuantityOf<isq::time> auto t)
|
||||||
{
|
{
|
||||||
return quantity_cast<isq::speed>(d / t);
|
return d / t;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<QuantityOf<isq::length> D, QuantityOf<isq::time> T, QuantityOf<isq::speed> V>
|
template<QuantityOf<isq::length> D, QuantityOf<isq::time> T, QuantityOf<isq::speed> V>
|
||||||
|
Reference in New Issue
Block a user