class Axiom::Types::NegativeInfinity

Represent a negative infinite number

Public Class Methods

<=>(_other) click to toggle source

Test the number against negative infinity

@param [Numeric, Infinity] _other

@return [0]

returned if the other object is negative infinity

@return [-1]

returned if the other object is not negative infinity

@api private

Calls superclass method Axiom::Types::Infinity::<=>
# File lib/axiom/types/support/infinity.rb, line 88
def self.<=>(_other)
  comparison = super
  -comparison if comparison
end

Private Class Methods

inverse() click to toggle source

The inverse of negative infinity

@return [Class<Infinity>]

@api private

# File lib/axiom/types/support/infinity.rb, line 98
def self.inverse
  Infinity
end
number() click to toggle source

The numeric representation of negative infinity

@return [Float]

@api private

# File lib/axiom/types/support/infinity.rb, line 108
def self.number
  -::Float::INFINITY
end