Clownfish::Float - Immutable double precision floating point number.
my $float = Clownfish::Float->new(2.5); my $value = $float->get_value;
my $float = Clownfish::Float->new($value);
Return a new Float.
value - Initial value.
my $result = $float->get_value();
Return the value of the Float.
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.
int64_t
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.
other
Returns: 0 if the numbers are equal, a negative number if self is less than other, and a positive number if self is greater than other.
self
my $result = $float->clone();
Return a clone of the object.
Clownfish::Float isa Clownfish::Obj.
To install Clownfish, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clownfish
CPAN shell
perl -MCPAN -e shell install Clownfish
For more information on module installation, please visit the detailed CPAN module installation guide.