pub trait Clamp: CubePrimitive + Sized {
// Provided methods
fn clamp(input: Self, min_value: Self, max_value: Self) -> Self { ... }
fn __expand_clamp(
context: &mut CubeContext,
input: Self::ExpandType,
min_value: Self::ExpandType,
max_value: Self::ExpandType,
) -> Self::ExpandType { ... }
}
Provided Methods§
Sourcefn clamp(input: Self, min_value: Self, max_value: Self) -> Self
fn clamp(input: Self, min_value: Self, max_value: Self) -> Self
Clamp the input value between the max and min values provided.
fn __expand_clamp( context: &mut CubeContext, input: Self::ExpandType, min_value: Self::ExpandType, max_value: Self::ExpandType, ) -> Self::ExpandType
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.