Skip to content

M_PI and other math constants #81

Answered by pattacini
pattacini asked this question in Q&A
Discussion options

You must be logged in to vote

@lornat75 cmath (or math.h) is included in other headers, yes, in yarp as well, as I was saying before, eventually causing inclusion order troubles.

At the moment, ctrlLib declares its own CTRL_PI equal to M_PI; so the problem would remain, unless we switch to the use of some trigonometric computations to get PI, which need to be carried out in a sort of init function, though.

However, I'd like to point out that the use of M_PI is ubiquitous in our code (yarp, icub-main, other sister projects) and has nothing to deal with ctrlLib. Therefore, I'd rather avoid tackling this problem within this PR. I think we could conveniently merge the PR and then go on with further considerations.

@drdanz PI

Replies: 23 comments

Comment options

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 7, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 8, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 10, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 10, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 11, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 15, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 18, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 18, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 21, 2015
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by pattacini
Comment options

You must be logged in to vote
0 replies
Comment options

pattacini
Dec 22, 2015
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #81 on December 15, 2020 15:28.