Inverse

com.phasmidsoftware.number.core.inner.Inverse
object Inverse

Provides functionality to determine if a given Rational represents the inverse of an integer. This object serves as an extractor for such instances of Rational.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Inverse.type

Members list

Value members

Concrete methods

def unapply(x: Rational): Option[Int]

Extractor method for identifying whether the given Rational object represents an inverse of an integer, and if so, extracting that integer.

Extractor method for identifying whether the given Rational object represents an inverse of an integer, and if so, extracting that integer.

Value parameters

x

The Rational instance to be deconstructed and analyzed.

Attributes

Returns

An Option containing the integer if the Rational instance represents an inverse of an integer and the denominator is a valid integer; otherwise, None.