fix: remove unused integrate() function from Utils.js - #328
Merged
mattqdev merged 1 commit intoMay 23, 2026
Merged
Conversation
Owner
|
🎉 This PR is included in version 3.28.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📘 Pull Request Template – PhysicsHub
Thank you for contributing to PhysicsHub!
Please complete the sections below to help us review your pull request efficiently.
🔍 Description
What was wrong
Utils.js contained a fully implemented integrate() function (Velocity Verlet integration) that was exported but
never imported or used anywhere in the codebase.
Having unused exported code causes two problems:
not realising that PhysicsBody.step() already handles integration internally. Two competing approaches sitting side
by side is unclear.
Note: collideBoundary() in the same file was also flagged as dead code in the original audit, but it has since been
adopted and is now actively used by BouncingBall.jsx — so only integrate() remained unused.
What was fixed
Removed the integrate() function entirely from Utils.js. No other file imported it, so there are zero callsite
changes needed.
Closes #BUG-015 (if applicable)
✅ Checklist
Before requesting a review, please ensure that you have:
npm run dev)🎨 Visual Changes (if UI-related)
IF CHANGES ARE RELATED TO SIMULATIONS PLEASE SEND A SHORT CLIP ABOUT IT
(OBLIGATORY)
📂 Type of Change
🧩 Additional Notes for Reviewers