com.phasmidsoftware.number.algebra.core.Q
Trait Q serves as a marker for entities that can be represented as a rational number.
It provides a method to convert the implementing instance into a Rational representation.
Attributes
- Graph
-
- Supertypes
-
class Object
trait Matchable
class Any
- Known subtypes
-
Members list
Retrieves an optional instance of Z if it exists.
Retrieves an optional instance of Z if it exists.
Attributes
- Returns
-
an Option[Z] that contains a Z instance if it's available, or None if not.
Converts this instance of Q to its corresponding rational representation.
Converts this instance of Q to its corresponding rational representation.
Attributes
- Returns
-
a Rational instance representing the current value
Converts the current instance to a Double representation. CONSIDER changing to maybeDouble returning Option[Double].
Converts the current instance to a Double representation. CONSIDER changing to maybeDouble returning Option[Double].
Attributes
- Returns
-
the Double value corresponding to the current instance
- Inherited from:
-
R
Returns an optional instance of Q from this R value.
Returns an optional instance of Q from this R value.
Attributes
- Returns
-
an optional instance of Q representing this specified R value
- Inherited from:
-
R