NAME
Math::PlanePath::Base::Generic -- various path helpers
SYNOPSIS
use Math::PlanePath::Base::Generic 'round_nearest';
$x = round_nearest($x);
DESCRIPTION
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
.
EXPORTS
Nothing is exported by default but each function below can be as in the usual Exporter style,
use Math::PlanePath::Base::Generic 'round_nearest';
FUNCTIONS
Generic
$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 = round_nearest($x);
SEE ALSO
Math::PlanePath, Math::PlanePath::Base::Digits
HOME PAGE
http://user42.tuxfamily.org/math-planepath/index.html
LICENSE
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/>.