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:
parent
8fe63e2dcc
commit
90c9d252d6
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue