it's OK to scale floats: humans like liters while source code likes cubic centimeters, and harley needs float precision to use cubic inches

This commit is contained in:
rusefi 2025-05-04 10:08:15 -04:00
parent 8fe63e2dcc
commit 90c9d252d6
1 changed files with 0 additions and 3 deletions

View File

@ -34,9 +34,6 @@ public:
// Scale the float in to our scaled channel
constexpr scaled_channel(std::conditional_t<mul != 1 || div != 1, float, IncompleteType> val) {
// If there are scale factors, it must NOT be a float. Why would you scale a float?
static_assert(std::is_integral_v<T>);
m_value = std::roundf(val * float(mul) / div);
}