Skip to content

feat: add delta x equation algorithm#231

Open
nickzerjeski wants to merge 1 commit intoTheAlgorithms:masterfrom
nickzerjeski:feat-delta-x-equation-191
Open

feat: add delta x equation algorithm#231
nickzerjeski wants to merge 1 commit intoTheAlgorithms:masterfrom
nickzerjeski:feat-delta-x-equation-191

Conversation

@nickzerjeski
Copy link
Copy Markdown

Summary\n- add for the motion equation \n- add unit tests for zero, positive and negative acceleration scenarios\n\n## Testing\n- Run options: --seed 16241

Running:

...

Finished in 0.000216s, 13888.8898 runs/s, 13888.8898 assertions/s.

3 runs, 3 assertions, 0 failures, 0 errors, 0 skips\n\nFixes #191

Copilot AI review requested due to automatic review settings April 13, 2026 08:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Δx (displacement) equation implementation to the maths/ algorithms set, aligning with the existing “class with .call” utility pattern and providing Minitest coverage per issue #191.

Changes:

  • Introduces DeltaX.call(initial_velocity:, time:, acceleration:) implementing Δx = v0·t + 1/2·a·t².
  • Adds unit tests covering zero, positive, and negative acceleration scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
maths/delta_x.rb Implements the Δx displacement calculation as a callable utility class.
maths/delta_x_test.rb Adds Minitest cases validating the formula across acceleration sign scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants