VulgarFractionNumber

com.phasmidsoftware.number.core.parse.VulgarFractionNumber
case class VulgarFractionNumber(fraction: String) extends ValuableNumber

Represents a vulgar (Unicode) fraction such as ⅓, ½, ¼, etc. These are single Unicode characters that represent common fractions.

Value parameters

fraction

the Unicode fraction character as a string

Attributes

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

Members list

Value members

Concrete methods

def value: Try[Rational]

Converts the vulgar fraction Unicode character to its rational representation.

Converts the vulgar fraction Unicode character to its rational representation.

Attributes

Returns

Try containing the Rational equivalent of the vulgar fraction, or a failure if the character is not a recognized vulgar fraction.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product