blib/lib/SPVM/Comparator/Double.pm untested

filter: Statementstmt n/a Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a SCAR -
1 package SPVM::Comparator::Double;
2  
3 1;
4  
5 =head1 Name
6  
7 SPVM::Comparator::Double - Interface Type for double Comparation Callback
8  
9 =head1 Usage
10
11 use Comparator::Double;
12
13 my $comparator = (Comparator::Double)method : int ($a : double, $b : double); {
14 return $a <=> $b;
15 };
16
17 my $result = $comparator->(3, 5);
18  
19 =head1 Description
20  
21 L<Comparator::Double|SPVM::Comparator::Double> is the interface type for the double comparation callback.
22  
23 =head1 Interface Methods
24  
25 C<required method : int ($a : double, $b : double);>
26  
27 This method must receive two values that types are C<double> and return the following value.
28  
29 If the first argument is greater than the second argument, returns 1. If the first argument is lower than the second argument, returns -1. If the first argument is equal to the second argument, returns 0.
30  
31 =head1 Copyright & License
32  
33 Copyright (c) 2023 Yuki Kimoto
34  
35 MIT License