MCPcopy Index your code
hub / github.com/endbasic/endbasic / ClampedMul

Interface ClampedMul

std/src/console/graphics.rs:85–88  ·  view source on GitHub ↗

Multiplication of values into a narrower type with silent value clamping.

Source from the content-addressed store, hash-verified

83
84/// Multiplication of values into a narrower type with silent value clamping.
85pub 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
90impl ClampedMul<u16, i16> for u16 {
91 fn clamped_mul(self, rhs: u16) -> i16 {

Callers

nothing calls this directly

Implementers 1

graphics.rsstd/src/console/graphics.rs

Calls

no outgoing calls

Tested by

no test coverage detected