SPVM::C...r::Float(3)

πŸ“¦ version 0.990125, in alpine 3.24

πŸŽ€ NAME πŸŽ€

Okay so bestie, this is the manual for SPVM::Comparator::Float β€” Interface Type for float Comparation Callback. It's a User Contributed Perl Documentation page, and the header up top gets all truncate-y and shows SPVM::C...r::Float(3); same manual, just terminal-core. The full name to remember is SPVM::Comparator::Float, no cap. πŸ’–

πŸ’» USAGE πŸ’»

Here's the exact usage vibe β€” the cast is doing its thing, then you call the comparator:

use Comparator::Float;

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

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

The way that $comparator->(3, 5) slays β€” it's literally just calling the callback. ✨

🌸 DESCRIPTION 🌸

Comparator::Float is the interface type for the float comparation callback. That's it β€” that's the whole description, and it's iconic. It's giving "small but mighty" interface energy: no cap, it's the type for float comparation callbacks. πŸ¦‹

✨ INTERFACE METHODS ✨

  • required method : int ($a : float, $b : float); β€” bestie, this method is required, and it must receive two values whose types are float. It returns the following value, and the return rules are giving very specific:
    • 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. ✨

So if you're implementing it: compare the first argument to the second and return those exact values. Periodt. πŸ‘‘

  • Copyright (c) 2023 Yuki Kimoto β€” yes, that's the copyright line, keep it exact.
  • MIT License β€” that's the license, and it's literally right there. 🫢

Okay that's the whole page, bestie. Sign-off vibes: source/version is perl v5.42.2, the date is 2026-02-03, and the footer also rocks the shortened SPVM::C...r::Float(3) title. Byeee, go compare some floats responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from