blib/lib/SPVM/Comparator/Float.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::Float;
2  
3 1;
4  
5 =head1 Name
6  
7 SPVM::Comparator::Float - Interface Type for float Comparation Callback
8  
9 =head1 Usage
10
11 use Comparator::Float;
12
13 my $comparator = (Comparator::Float)method : int ($a : float, $b : float); {
14 return $a <=> $b;
15 };
16
17 my $result = $comparator->(3, 5);
18  
19 =head1 Description
20  
21 L<Comparator::Float|SPVM::Comparator::Float> is the interface type for the float comparation callback.
22  
23 =head1 Interface Methods
24  
25 C<required method : int ($a : float, $b : float);>
26  
27 This method must receive two values that types are C<float> 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