Math::PlanePath::Base::Generic -- various path helpers
use Math::PlanePath::Base::Generic 'round_nearest'; $x = round_nearest($x);
This is a few generic helper functions for the PlanePath code. They're designed to work on plain Perl integers and floats and in some cases there's some special support for Math::BigInt.
Math::BigInt
Nothing is exported by default but each function below can be as in the usual Exporter style,
use Math::PlanePath::Base::Generic 'round_down_pow';
$x = round_nearest ($x)
Return $x rounded to the nearest integer. If $x is half way, such as 2.5 then it's round upwards to 3.
$x
$x = round_nearest($x);
Math::PlanePath, Math::PlanePath::Base::Digits
http://user42.tuxfamily.org/math-planepath/index.html
Copyright 2010, 2011, 2012 Kevin Ryde
This file is part of Math-PlanePath.
Math-PlanePath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Math-PlanePath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Math-PlanePath. If not, see <http://www.gnu.org/licenses/>.
To install Math::PlanePath, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::PlanePath
CPAN shell
perl -MCPAN -e shell install Math::PlanePath
For more information on module installation, please visit the detailed CPAN module installation guide.