Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(utils): Add function to compute linear coefficients #228

Merged

Conversation

ladislas
Copy link
Member

Adds:

  • Point struct
  • LinearCoefficients struct
  • compute function
  • unit tests

closes #225

@ladislas ladislas force-pushed the ladislas/feature/add-linear-function-coefficients-computation branch from e398686 to 8cf29b6 Compare April 22, 2021 10:11
@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #228 (588b4be) into develop (618761c) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 588b4be differs from pull request most recent head 645f86f. Consider uploading reports for the commit 645f86f to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##           develop      #228   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           44        47    +3     
  Lines          673       746   +73     
=========================================
+ Hits           673       746   +73     
Impacted Files Coverage Δ
libs/LKUtils/tests/LKUtils_test_map.cpp 100.00% <ø> (ø)
libs/LKUtils/include/LKUtils.h 100.00% <100.00%> (ø)
libs/LKUtils/source/LKUtils.cpp 100.00% <100.00%> (ø)
...ibs/LKUtils/tests/LKUtils_test_linear_function.cpp 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 618761c...645f86f. Read the comment docs.

libs/LKUtils/source/LKUtils.cpp Outdated Show resolved Hide resolved
libs/LKUtils/tests/LKUtils_test_linear_function.cpp Outdated Show resolved Hide resolved
float y_intercept {0.f};
};

auto computeLinearCoefficients(Point p1, Point p2) -> LinearCoefficients;
Copy link
Member

Choose a reason for hiding this comment

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

Après quelques recherches, je comprends l'usage du trailing pour map mais pas pour ici.

De ce que j'ai pu lire, il était utilisé soit

  • Pour des types passés en paramètres
  • Pour des types de retour complexe (association de plusieurs types)

Je viens de lire qu'il est parfois utilisé lorsque le type est long et qu'on souhaite améliorer la lisibilité. Est-ce le cas ici?

@ladislas ladislas force-pushed the ladislas/feature/add-linear-function-coefficients-computation branch from 588b4be to f0819bc Compare April 22, 2021 11:55
Kabroc and others added 2 commits April 22, 2021 14:53
Adds:

- Point struct
- LinearCoefficients struct
- compute function
- unit tests

closes #225
@ladislas ladislas force-pushed the ladislas/feature/add-linear-function-coefficients-computation branch from f0819bc to 645f86f Compare April 22, 2021 12:53
@codeclimate
Copy link

codeclimate bot commented Apr 22, 2021

Code Climate has analyzed commit 645f86f and detected 0 issues on this pull request.

View more on Code Climate.

@ladislas ladislas merged commit 8d9a5cf into develop Apr 22, 2021
@ladislas ladislas deleted the ladislas/feature/add-linear-function-coefficients-computation branch April 22, 2021 12:54
@sonarcloud
Copy link

sonarcloud bot commented Apr 22, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

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.

3 participants