Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
pinocchio
Commits
cb843547
Commit
cb843547
authored
6 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[Math] Add function PI to return the value of PI according to the Scalar type
parent
e76426de
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/math/fwd.hpp
+12
-2
12 additions, 2 deletions
src/math/fwd.hpp
with
12 additions
and
2 deletions
src/math/fwd.hpp
+
12
−
2
View file @
cb843547
//
// Copyright (c) 2016 CNRS
// Copyright (c) 2016
,2018
CNRS
//
// This file is part of Pinocchio
// Pinocchio is free software: you can redistribute it
...
...
@@ -22,7 +22,17 @@
namespace
se3
{
const
double
PI
=
boost
::
math
::
constants
::
pi
<
double
>
();
///
/// \brief Returns the value of PI according to the template parameters Scalar
///
/// \tparam Scalar The scalar type of the return pi value
///
template
<
typename
Scalar
>
const
Scalar
PI
()
{
return
boost
::
math
::
constants
::
pi
<
Scalar
>
();
}
/// The value of PI for double scalar type
const
double
PId
=
PI
<
double
>
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment