Class: Axiom::Types::NegativeInfinity

Inherits:
Infinity
  • Object
show all
Defined in:
lib/axiom/types/support/infinity.rb

Overview

Represent a negative infinite number

Class Method Summary collapse

Methods inherited from Infinity

coerce, succ

Class Method Details

.<=>(_other) ⇒ 0, -1

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test the number against negative infinity

Parameters:

Returns:

  • (0)

    returned if the other object is negative infinity

  • (-1)

    returned if the other object is not negative infinity



89
90
91
92
# File 'lib/axiom/types/support/infinity.rb', line 89

def self.<=>(_other)
  comparison = super
  -comparison if comparison
end