given_Convertible_RationalNumber_Real

com.phasmidsoftware.number.algebra.eager.RationalNumber.given_Convertible_RationalNumber_Real

Provides an instance of the Convertible typeclass for transforming an instance of Real into a RationalNumber.

This conversion attempts to recover a RationalNumber representation from a given Real object. If the Real instance cannot be converted into a RationalNumber, an AlgebraException is thrown describing the failure.

Attributes

Returns

a RationalNumber instance that is equivalent to the provided Real, if the conversion is successful

Note
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Transforms an instance of type U into type T by applying a specific operation, optionally using an additional parameter of type T.

Transforms an instance of type U into type T by applying a specific operation, optionally using an additional parameter of type T.

Value parameters

t

a template object of type T that might assist in the conversion

u

the source object of type U to be converted

Attributes

Returns

the converted object of type T