SPVM::C...:Double(3)

πŸ“¦ version 0.990125, in alpine 3.24

πŸ’– Name πŸ’–

Okay so welcome to SPVM::C...:Double(3), bestie β€” this page comes from the User Contributed Perl Documentation manual, and the main character is SPVM::Comparator::Double: the interface type for the double comparation callback. πŸ’…

✨ Usage ✨

Here's the usage example, literally verbatim:

         use Comparator::Double;

         my $comparator = (Comparator::Double)method : int ($a : double, $b : double); {
           return $a <=> $b;
         };

         my $result = $comparator->(3, 5);

πŸ¦‹ Description πŸ¦‹

Comparator::Double is the interface type for the double comparation callback. No cap, that's the whole vibe. 🫢

🌸 Interface Methods 🌸

The required method is exactly this signature:

required method : int ($a : double, $b : double);

This method must receive two values whose types are double, and it returns the following value:

  • If the first argument is greater than the second argument, it returns 1. βœ…
  • If the first argument is lower than the second argument, it returns -1. πŸ’€
  • If the first argument is equal to the second argument, it returns 0. ✨

Copyright (c) 2023 Yuki Kimoto

MIT License

Stay slaying, bestie πŸ’– β€” this page is from perl v5.42.2 and dated 2026-02-03.

πŸ“¦ where this page comes from