Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains 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
e9f4f16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why we should name constants wisely and stop using magic numbers.
e9f4f16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What names would you propose here? ;) Those are just coefficients coming from the Dormand-Prince method, they don't really carry any meaning that would warrant naming them... And I could make the same mistake by doing for example:
const COEFF_ERROR_1: f64 = 71.0 / 576000.0;
e9f4f16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Knowing that this value is a coefficient error term is useful for anyone trying to understand what this bit of code is doing. This is reason enough to name it.