Skip to content

feat: normalize a number to [0, 1] - #1913

Open
hazrid93 wants to merge 1 commit into
toss:mainfrom
hazrid93:hazrid93/39_550
Open

feat: normalize a number to [0, 1]#1913
hazrid93 wants to merge 1 commit into
toss:mainfrom
hazrid93:hazrid93/39_550

Conversation

@hazrid93

Copy link
Copy Markdown

Closes #550.

Add normalize(value, min, max) returning (value min) / (max min). Values outside [min,max] map outside [0,1] (no clamping: pair with clamp to bound). Throws RangeError when max < min.

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
es-toolkit Ready Ready Preview, Comment Jul 20, 2026 11:13am

Request Review

Closes toss#550.

Add normalize(value, min, max) returning (value min) / (max min). Values outside [min,max] map outside [0,1] (no clamping: pair with clamp to bound). Throws RangeError when max < min.
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.

Support normalize for numbers

1 participant