#clamp #restricted #bounds #struct #generic

clamped_values

Provides a generic ClampedValue struct that stores a value and ensures that it is always within the specified minimum and maximum values

1 unstable release

0.1.0 Jan 6, 2024

#4 in #restricted

MIT/Apache

12KB
180 lines

Provides a generic ClampedValue struct that stores a value and ensures that it is always within the specified minimum and maximum values.


Usage

Add the following to your Cargo.toml

[dependencies]
clamped_values = "0.1.0"

Dependencies

~150KB