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
libraries: unify the pi values #17536
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ struct sTone | |
//////////////////////////////////////////////////////////// | ||
// Converts frequency (Hz) to angular velocity | ||
//////////////////////////////////////////////////////////// | ||
const double PI = 3.14159265359; | ||
const double PI = M_PI; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is someone else's code we're borrowing here, too. Not sure we want to be modifying it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure we should put a float PI into a double PI |
||
double w(const double dHertz) | ||
{ | ||
return dHertz * 2.0 * PI; | ||
|
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.
Should we really be modifying
CMSIS_5
source code? @andyp1perThere 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.
Yes let's not modify it
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.
Thanks @andyp1per - we really ought not leave these little landmines around for other people to find, but I can't see how we can sensibly put warnings on these things for people to find.