Skip to content

Add clamp crate#17

Merged
Turbo87 merged 1 commit into
mainfrom
clamp
Jun 16, 2026
Merged

Add clamp crate#17
Turbo87 merged 1 commit into
mainfrom
clamp

Conversation

@Turbo87

@Turbo87 Turbo87 commented Jun 16, 2026

Copy link
Copy Markdown
Member

Ord::clamp() and f32::clamp() / f64::clamp() (stable since Rust 1.50) restrict a value to a range, covering the crate's single clamp() function for all Ord types and floats, so this is a full replacement.

@TyOverby 👋 does this seem accurate to you? any objections? (see rust-lang/crates.io#13855 for more information)

@TyOverby

Copy link
Copy Markdown

Looks good!

@Turbo87

Turbo87 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

thanks for the confirmation :)

@Turbo87
Turbo87 merged commit 8781ccf into main Jun 16, 2026
2 checks passed
@Turbo87
Turbo87 deleted the clamp branch June 19, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants