-
-
27 Feb 2018 08:38:55 UTC
- Distribution: Clownfish
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Clone repository
- Issues
- Testers (1316 / 0 / 7)
- Kwalitee
Bus factor: 0- License: apache_2_0
- Perl: v5.8.3
- Activity
24 month- Tools
- Download (230.31KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- The Apache Lucy Project <dev at lucy dot apache dot org>
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Clownfish::Float - Immutable double precision floating point number.
SYNOPSIS
my $float = Clownfish::Float->new(2.5); my $value = $float->get_value;
DESCRIPTION
CONSTRUCTORS
new
my $float = Clownfish::Float->new($value);
Return a new Float.
value - Initial value.
METHODS
get_value
my $result = $float->get_value();
Return the value of the Float.
to_i64
my $int = $float->to_i64();
Convert the Float to an integer, truncating toward zero. Throw an exception if the value is out of the range of an
int64_t
.compare_to
my $int = $float->compare_to($other);
Indicate whether one number is less than, equal to, or greater than another. Throws an exception if
other
is neither a Float nor an Integer.Returns: 0 if the numbers are equal, a negative number if
self
is less thanother
, and a positive number ifself
is greater thanother
.clone
my $result = $float->clone();
Return a clone of the object.
INHERITANCE
Clownfish::Float isa Clownfish::Obj.
Module Install Instructions
To install Clownfish, copy and paste the appropriate command in to your terminal.
cpanm Clownfish
perl -MCPAN -e shell install Clownfish
For more information on module installation, please visit the detailed CPAN module installation guide.