R

com.phasmidsoftware.number.algebra.core.R
trait R

Trait R extends Q and represents all Real numbers.

It inherits the capability to be represented as a Rational from Q and adds functionality for conversion to a Double.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Circle
class Angle
trait Q
trait Z
trait N
trait Nat
object NatZero
class Succ
class WholeNumber
trait ExactNumber
class Real
Show all

Members list

Value members

Abstract methods

def asDouble: Double

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

def maybeQ: Option[Q]

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