Skip to content

refactor: replace magic number with named constant in intensity calculation#655

Open
Akshita-2307 wants to merge 1 commit into
Shruti070107:mainfrom
Akshita-2307:fix/replace-magic-number
Open

refactor: replace magic number with named constant in intensity calculation#655
Akshita-2307 wants to merge 1 commit into
Shruti070107:mainfrom
Akshita-2307:fix/replace-magic-number

Conversation

@Akshita-2307

Copy link
Copy Markdown

Summary

Replaces the hardcoded value \10\ in the demand zone intensity calculation with a named constant \MAX_ORDERS_FOR_FULL_INTENSITY\ to improve code readability and maintainability.

Changes

  • Added \MAX_ORDERS_FOR_FULL_INTENSITY = 10\ constant at module level
  • Used the constant in \Math.min(providerOrders.length / MAX_ORDERS_FOR_FULL_INTENSITY, 1)\

Closes #535

…lation

Replaces the hardcoded value 10 in the demand zone intensity
calculation with a named constant MAX_ORDERS_FOR_FULL_INTENSITY
for improved readability and maintainability.

Closes Shruti070107#535
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.

Replace magic number in demand zone intensity calculation with constant

1 participant