Skip to content
Snippets Groups Projects
Commit cb843547 authored by jcarpent's avatar jcarpent
Browse files

[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
//
// 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>();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment