given_Convertible_Real_RationalNumber

com.phasmidsoftware.number.algebra.eager.Real.given_Convertible_Real_RationalNumber

Provides a given instance of the Convertible typeclass to enable conversion from an instance of RationalNumber to an instance of Real.

This given instance defines a concrete implementation of the convert method that transforms a RationalNumber into a Real by utilizing the toDouble method of the RationalNumber class. The convert method takes a Real witness object (serving as a prototype for the conversion) and a RationalNumber to be converted.

The resulting Real is constructed using the numeric value of the RationalNumber (converted to a Double) and the default fuzziness of the Real.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def convert(witness: Real, u: RationalNumber): Real

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