mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 03:14:29 +02:00
style: more whitespace issues caused by rebase fixed
This commit is contained in:
@@ -148,6 +148,7 @@ public:
|
||||
{
|
||||
return quantity<quantity_spec[U{}], Rep>{*this};
|
||||
}
|
||||
|
||||
template<Unit U>
|
||||
requires requires(quantity q) { value_cast<U{}>(q); }
|
||||
[[nodiscard]] constexpr quantity<quantity_spec[U{}], Rep> force_in(U) const
|
||||
|
@@ -159,7 +159,6 @@ template<Representation Rep, Reference R>
|
||||
template<Unit auto To, auto R, typename Rep>
|
||||
[[nodiscard]] constexpr quantity<detail::clone_reference_with<To>(R), Rep> floor(const quantity<R, Rep>& q) noexcept
|
||||
requires((!treat_as_floating_point<Rep>) || requires { floor(q.numerical_value_ref_in(q.unit)); } ||
|
||||
|
||||
requires { std::floor(q.numerical_value_ref_in(q.unit)); }) &&
|
||||
(To == get_unit(R) || requires {
|
||||
q.force_in(To);
|
||||
@@ -199,7 +198,6 @@ template<Unit auto To, auto R, typename Rep>
|
||||
template<Unit auto To, auto R, typename Rep>
|
||||
[[nodiscard]] constexpr quantity<detail::clone_reference_with<To>(R), Rep> ceil(const quantity<R, Rep>& q) noexcept
|
||||
requires((!treat_as_floating_point<Rep>) || requires { ceil(q.numerical_value_ref_in(q.unit)); } ||
|
||||
|
||||
requires { std::ceil(q.numerical_value_ref_in(q.unit)); }) &&
|
||||
(To == get_unit(R) || requires {
|
||||
q.force_in(To);
|
||||
@@ -241,7 +239,6 @@ template<Unit auto To, auto R, typename Rep>
|
||||
template<Unit auto To, auto R, typename Rep>
|
||||
[[nodiscard]] constexpr quantity<detail::clone_reference_with<To>(R), Rep> round(const quantity<R, Rep>& q) noexcept
|
||||
requires((!treat_as_floating_point<Rep>) || requires { round(q.numerical_value_ref_in(q.unit)); } ||
|
||||
|
||||
requires { std::round(q.numerical_value_ref_in(q.unit)); }) &&
|
||||
(To == get_unit(R) || requires {
|
||||
::mp_units::floor<To>(q);
|
||||
@@ -284,7 +281,6 @@ template<auto R1, typename Rep1, auto R2, typename Rep2>
|
||||
requires requires { common_reference(R1, R2); } &&
|
||||
(
|
||||
requires { hypot(x.numerical_value_ref_in(x.unit), y.numerical_value_ref_in(y.unit)); } ||
|
||||
|
||||
requires { std::hypot(x.numerical_value_ref_in(x.unit), y.numerical_value_ref_in(y.unit)); })
|
||||
{
|
||||
constexpr auto ref = common_reference(R1, R2);
|
||||
|
@@ -559,10 +559,8 @@ TEST_CASE("piecewise_constant_distribution")
|
||||
3.0 * isq::length[si::metre]};
|
||||
|
||||
auto stl_dist = std::piecewise_constant_distribution<rep>(intervals_rep, [](rep val) { return val; });
|
||||
auto units_dist =
|
||||
|
||||
mp_units::piecewise_constant_distribution<q>(intervals_qty,
|
||||
[](q qty) { return qty.numerical_value_ref_in(qty.unit); });
|
||||
auto units_dist = mp_units::piecewise_constant_distribution<q>(
|
||||
intervals_qty, [](q qty) { return qty.numerical_value_ref_in(qty.unit); });
|
||||
|
||||
CHECK(units_dist.intervals() == intervals_qty_vec);
|
||||
CHECK(units_dist.densities() == stl_dist.densities());
|
||||
@@ -629,10 +627,8 @@ TEST_CASE("piecewise_linear_distribution")
|
||||
3.0 * isq::length[si::metre]};
|
||||
|
||||
auto stl_dist = std::piecewise_linear_distribution<rep>(intervals_rep, [](rep val) { return val; });
|
||||
auto units_dist =
|
||||
|
||||
mp_units::piecewise_linear_distribution<q>(intervals_qty,
|
||||
[](q qty) { return qty.numerical_value_ref_in(qty.unit); });
|
||||
auto units_dist = mp_units::piecewise_linear_distribution<q>(
|
||||
intervals_qty, [](q qty) { return qty.numerical_value_ref_in(qty.unit); });
|
||||
|
||||
CHECK(units_dist.intervals() == intervals_qty_vec);
|
||||
CHECK(units_dist.densities() == stl_dist.densities());
|
||||
|
Reference in New Issue
Block a user