Math::Shape::Range - a range object which has min and max values
version 0.12
Constructor, requires 2 values: minimum and maximum floating point numbers.
my $range = Math::Shape::Range->new(3.5, 4);
Returns a new range object with the min and max attributes sorted.
my $sorted_range = $range->sort;
Boolean method which returns 1 if the range object overlaps with another range, or 0 if not. Requires another range object as an argument.
my $range1 = Math::Shape::Range->new(1, 10); my $range2 = Math::Shape::Range->new(11, 20); my $range3 = Math::Shape::Range->new(15, 25); $range1->is_overlapping($range2); # 0 $range2->is_overlapping($range3); # 1
Returns a new Range object of the hull of two ranges. Requires another Math::Shape::Range object as an argument.
David Farrell <sillymoos@cpan.org>
This software is copyright (c) 2014 by David Farrell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Math::Shape::Vector, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Shape::Vector
CPAN shell
perl -MCPAN -e shell install Math::Shape::Vector
For more information on module installation, please visit the detailed CPAN module installation guide.