Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function Fix #5349

Closed
wants to merge 2 commits into from
Closed

Function Fix #5349

wants to merge 2 commits into from

Conversation

natalieday
Copy link

@natalieday natalieday commented Apr 13, 2024

Renaming function from floorFractionDigits to roundToFixedDecimal

Description:

This pull request addresses an issue with the function name floorFractionDigits, which was misleading as it implied flooring the number, whereas the function actually rounds to the nearest decimal value. To provide clarity and context for future developers working on this codebase, the function has been renamed to roundToFixedDecimal.

This change ensures that the function name accurately reflects its behavior, making the codebase more understandable and maintainable. All occurrences of the function name have been updated across the codebase to maintain consistency.

Resolved Issue: TODO: Fix naming, since it doesn't floor (floorFractionDigits(2.5) === 3.0)

Huly®: UBERF-6546

Signed-off-by: natalieday <natalieannday@gmail.com>
Signed-off-by: natalieday <natalieannday@gmail.com>
@@ -73,8 +73,11 @@ export function checkAdaptiveMatching (size: WidthType | null, limit: WidthType)
return size !== null ? range.has(size) : false
}

// TODO: Fix naming, since it doesn't floor (floorFractionDigits(2.5) === 3.0)
export function floorFractionDigits (n: number | string, amount: number): number {
// Renamed the function from floorFractionDigits to roundToFixedDecimal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this annotation from the code.

@aonnikov aonnikov closed this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants