BlakeGuilloud / BlakeGuilloud/ganon
Implement NormalizeTwoDimensionalVector
- Dominant language
- JavaScript
- Stars
- 92
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
There is currently a method called `normalizeTwoDimensionalVector` that lives in `/lib/normalizeTwoDimensionalVector.js`.
It is incomplete and needs to be fixed!
The method should return a normalized representation of a vector which can be found by:
1. Finding the length of the vector
2. Dividing the components of the vector by the length of the vector
### Acceptance Criteria:
1. Running `yarn test normalizeTwoDimensionalVector` results in tests passing.
2. You have written a skeleton method for someone else to work on.
3. You have written tests surrounding your skeleton method.
4. Running `yarn lint` does not print any errors to the console!
5. Optional: write one or two more tests surrounding the method you are solving to account for potential edge cases.
### Please include the skeleton of a new method + an accompanying test for someone else to work on at the time of creating a pull request! A pull request will most likely be denied if it does not contain a skeleton method for someone else to work on! For more information, please read the [Contributing Guide](https://github.com/BlakeGuilloud/ganon/blob/master/CONTRIBUTING.md).
Thank you so much for your contribution!
Contributor guide
Research direction
Open lib/normalizeTwoDimensionalVector.js and inspect the incomplete method and its surrounding tests. Run yarn test normalizeTwoDimensionalVector first, then implement the stated length-and-division behavior, add the requested skeleton and accompanying test, and verify with yarn test normalizeTwoDimensionalVector and yarn lint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100