Skip to content

DOCUMENTATION: Add maths doc#113

Merged
Saverio976 merged 3 commits intodevfrom
doc/RB-149-Doc-for-maths-lib
Oct 18, 2023
Merged

DOCUMENTATION: Add maths doc#113
Saverio976 merged 3 commits intodevfrom
doc/RB-149-Doc-for-maths-lib

Conversation

@kw4ntiq
Copy link
Copy Markdown
Collaborator

@kw4ntiq kw4ntiq commented Oct 18, 2023

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Norm of the code has been respected
  • In what state is your pull request?
  • Ready to merge / Waiting a reviwer to see my work.
  • Work In Progress (WIP) / My work is not finish but i want daily reviews. (Draft)
  • CI Review / I want to see what the CI thinks of my work.
  • Need feedback / Just to have feedback on what i produced. (May not be merged)
  • What kind of change does this PR introduce? (You can choose multiple)
  • Bug fix
  • Feature request
  • New / Updated documentation
  • Testing CI ( Make the pull request in draft mode)
  • What is the current behavior? (link an issue based on the kind of change this pr introduce)

  • What is the new behavior (if this is a feature change)?

  • Other information:

Summary by CodeRabbit

  • New Feature: Introduced a "Maths" utility in our developer guide. This utility enhances the precision of mathematical operations involving decimal numbers. It includes features for converting between different number representations and performing arithmetic operations with preserved decimal precision. This update will improve the accuracy of calculations within the Entity Component System (ECS) framework, leading to more reliable outcomes in our software.

@kw4ntiq kw4ntiq self-assigned this Oct 18, 2023
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 18, 2023

Walkthrough

This change introduces a new namespace "Maths" in the ECS section of the developer guide. It provides utility functions for precise mathematical operations involving decimal numbers, including conversions, arithmetic operations, and modifications. A constant DECIMALS_TO_CONSERVE is also added to specify the number of decimal places to preserve during calculations.

Changes

File Summary
docs/SUMMARY.md Added a new file "Maths" to the ECS section of the developer guide.
docs/.../ecs/maths.md Introduced a new namespace "Maths" with utility functions for precise mathematical operations involving decimal numbers. Added a constant DECIMALS_TO_CONSERVE for decimal precision.

🐇

In the land of code, where logic intertwines,

A rabbit hops, leaving traces of lines.

With a leap and a bound, a new namespace takes flight,

Maths in ECS, shining bright in the night.

Decimal precision, a constant's delight,

CodeRabbit's work, in the soft moonlight. 🌙


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
  • Additionally, enter @coderabbitai pause to halt the bot's ongoing reviews as any issue or review comment. To
    resume reviews, enter @coderabbitai resume as any issue or review comment.

@kw4ntiq kw4ntiq requested a review from Saverio976 October 18, 2023 12:27
@kw4ntiq kw4ntiq added the documentation Improvements or additions to documentation label Oct 18, 2023
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Details

Commits Files that changed from the base of the PR and between 3f90c38 and e7bf3af.
Files selected for processing (2)
  • docs/SUMMARY.md (1 hunks)
  • docs/developer-guide/ecs/maths.md (1 hunks)
Additional comments (Suppressed): 1
docs/SUMMARY.md (1)
  • 34-37: The new "Maths" section has been added to the ECS section of the developer guide. Ensure that the link to the new "Maths.md" file is correct and that the file exists at the specified location.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Details

Commits Files that changed from the base of the PR and between e7bf3af and 2cd14d1.
Files selected for processing (1)
  • docs/developer-guide/ecs/maths.md (1 hunks)
Additional comments (Suppressed): 1
docs/developer-guide/ecs/maths.md (1)
  • 1-93: The documentation is well-written and provides a clear explanation of the purpose and usage of the Maths namespace and its functions. The examples provided for each function are helpful in understanding the functionality. However, it would be beneficial to include information about the error handling strategy for the functions, especially for edge cases such as division by zero in the divisionWithTwoIntDecimals function. This would provide a more comprehensive understanding of the functions' behavior.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 3

Details

Commits Files that changed from the base of the PR and between 2cd14d1 and b34c08a.
Files selected for processing (1)
  • docs/developer-guide/ecs/maths.md (1 hunks)
Additional comments (Suppressed): 1
docs/developer-guide/ecs/maths.md (1)
  • 1-93: The documentation is well-written and provides a clear explanation of the purpose and usage of the Maths namespace and its functions. However, there seems to be a discrepancy in the examples provided for the additionWithTwoIntDecimals, multiplicationWithTwoIntDecimals, and divisionWithTwoIntDecimals functions. The examples suggest that these functions return a float, but the function signatures indicate that they return an integer. Please verify if the return type in the function signatures is correct or if the examples need to be updated.

@Saverio976 Saverio976 merged commit a0692a4 into dev Oct 18, 2023
@Saverio976 Saverio976 deleted the doc/RB-149-Doc-for-maths-lib branch March 4, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants