Skip to content

Conversation

@MOHITKOURAV01
Copy link
Contributor

Related issue: #32362

Description

This PR removes a redundant TODO comment in src/math/Vector3.js that was causing confusion. The comment // TODO lengthSquared? appeared above the lengthSq() method, suggesting the method might need to be renamed or implemented differently.

However, the lengthSq() method is already correctly implemented and follows the project's established naming convention of using the Sq suffix for methods that return squared values (similar to distanceToSquared(), manhattanDistanceTo(), etc.). The TODO comment was outdated and misleading, so it has been removed to improve code clarity.

Changes:

  • Removed the // TODO lengthSquared? comment from line 747 in src/math/Vector3.js

Testing:

  • All unit tests pass (npm run test-unit)
  • Linting passes (npm run lint)
  • No functional changes to the codebase

The lengthSq() method is already correctly implemented and follows
the project's naming convention. Removed the confusing TODO comment.
@github-actions
Copy link

github-actions bot commented Nov 25, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.29
83.05
350.29
83.05
+0 B
+0 B
WebGPU 612.89
170.29
612.89
170.29
+0 B
+0 B
WebGPU Nodes 611.49
170.01
611.49
170.01
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 482.23
117.82
482.23
117.82
+0 B
+0 B
WebGPU 683.78
186
683.78
186
+0 B
+0 B
WebGPU Nodes 633.61
173.18
633.61
173.18
+0 B
+0 B

@mrdoob mrdoob merged commit 8958675 into mrdoob:dev Nov 25, 2025
8 of 9 checks passed
@mrdoob
Copy link
Owner

mrdoob commented Nov 25, 2025

This PR removes a redundant TODO comment in src/math/Vector3.js that was causing confusion

Sorry for confusing you! Hope you can move on with your day 🤞

@mrdoob mrdoob added this to the r182 milestone Nov 25, 2025
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