Data::Vitals::Util - Utility methods for the Perl "Vital Statistics" Library
Data::Vitals::Util defines a set of functions that are used in various places within the Data::Vitals classes.
All functions are importable using the standard Exporter mechanism
use Data::Vitals::Util 'cm2inch';
The cm2inch function is a specialised method for converting a centimetre measurement to inchs. It converts using the standard 2.54004 multiplier, but rounds down to the half-inch.
cm2inch
The algorithm used is specifically designed so that, when used as a pair with the inch2cm method, any value that cm2inch(inch2cm($x)) == $x is always true, although it may not be true of the reverse.
cm2inch(inch2cm($x)) == $x
It takes as argument a number without any 'cm' indicator, and returns the number of inches as a similar plain number.
The inch2cm function is a specialised method for converting an inch measurement to centimetres. It converts using the standard 2.54004 multiplier, but rounds up to the nearest centimetre.
inch2cm
The algorithm used is specifically designed so that, when used as a pair with the cm2inch method, any value that cm2inch(inch2cm($x)) == $x is always true, although it may not be true of the reverse.
It takes as argument a number without any 'inch' indicator, and returns the number of centimetres as a similar plain number.
Bugs should always be reported via the CPAN bug tracker
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-Vitals
For other issues, contact the maintainer.
Adam Kennedy <adamk@cpan.org>
Thank you to Phase N (http://phase-n.com/) for permitting the open sourcing and release of this distribution.
Copyright 2004 - 2008 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Data::Vitals, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Vitals
CPAN shell
perl -MCPAN -e shell install Data::Vitals
For more information on module installation, please visit the detailed CPAN module installation guide.