Multiplication of values into a narrower type with silent value clamping.
| 83 | |
| 84 | /// Multiplication of values into a narrower type with silent value clamping. |
| 85 | pub trait ClampedMul<T, O> { |
| 86 | /// Multiplies self by `rhs` and clamps the result to fit in `O`. |
| 87 | fn clamped_mul(self, rhs: T) -> O; |
| 88 | } |
| 89 | |
| 90 | impl ClampedMul<u16, i16> for u16 { |
| 91 | fn clamped_mul(self, rhs: u16) -> i16 { |
nothing calls this directly
no outgoing calls
no test coverage detected