Skip to content

feat: add a Round function - #493

Open
hazrid93 wants to merge 1 commit into
sodiray:masterfrom
hazrid93:hazrid93/50_61
Open

feat: add a Round function#493
hazrid93 wants to merge 1 commit into
sodiray:masterfrom
hazrid93:hazrid93/50_61

Conversation

@hazrid93

Copy link
Copy Markdown

Closes #61.

Add round(value, precision=0) mirroring lodash's round: rounds value to precision decimal places. Uses the exponential notation string trick to avoid the common floating point error (e.g. round(1.005, 2) is 1.01, not 1). No arg precision rounds to an integer.

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

@hazrid93 is attempting to deploy a commit to the rayunishinedev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@hazrid93
hazrid93 force-pushed the hazrid93/50_61 branch 2 times, most recently from afb7db0 to a1ba76d Compare July 20, 2026 15:26
Closes sodiray#61.

Add round(value, precision=0) mirroring lodash's round: rounds value to precision decimal places. Uses the exponential notation string trick to avoid the common floating point error (e.g. round(1.005, 2) is 1.01, not 1). No arg precision rounds to an integer.
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.

Add a Round function

1 participant