Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

145_Ray_Casting - optimice performance by using square distance

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript

Research direction

Open 145_Ray_Casting/P5/particle.js at line 29 and inspect how dist is used for comparison. Update the comparison to use square distance, then verify that the ray-casting example still selects the same result and behaves correctly.

Written by the indexing model from the issue text.

Description

when using dist only for compare, its better to use the square distance. Because otherwise quare-root needs to be calculated which is much more cpu heavy.

https://github.com/CodingTrain/Coding-Challenges/blob/2a9d68112b1aa80cbd5aa303f1d97dda7b045fde/145_Ray_Casting/P5/particle.js#L29

Dominant language
JavaScript
Stars
189
Forks
86
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CodingTrain/Coding-Challenges

All issues in CodingTrain/Coding-Challenges

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.