UnitInterval

scalus.cardano.ledger.UnitInterval
See theUnitInterval companion object
case class UnitInterval(numerator: Long, denominator: Long)

Represents a unit interval (a number between 0 and 1) in the Cardano blockchain.

A unit interval is represented as a fraction with a numerator and denominator, where numerator <= denominator and denominator > 0.

Value parameters

denominator

The denominator of the fraction

numerator

The numerator of the fraction

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def toDouble: Double

Converts this unit interval to a double value.

Converts this unit interval to a double value.

Attributes

Returns

The double value representation

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product