Price

vecxt_re.Price$package.Price
object Price

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Price.type

Members list

Value members

Concrete methods

def apply(v: Double, u: PriceUnit): Price

e.g. Price(102, PriceUnit.Pts) is 1.02

e.g. Price(102, PriceUnit.Pts) is 1.02

Attributes

Concrete fields

val par: Price

Givens

Givens

given given_Ordering_Price: Ordering[Price]

Extensions

Extensions

extension (x: Price)
def +(r: Rel): Price
def -(r: Rel): Price
def -(y: Price): Rel

The change in price from y to x.

The change in price from y to x.

Attributes

def /(y: Price): Double

The ratio of two prices, e.g. a gross return.

The ratio of two prices, e.g. a gross return.

Attributes

def approxEq(y: Price, tol: Double = ...): Boolean
inline def canonical: Double

The canonical value, where 1.0 is par.

The canonical value, where 1.0 is par.

Attributes

def in(u: PriceUnit): Double

The price expressed in unit u, e.g. Price(1.02, PriceUnit.One).in(PriceUnit.Pts) == 102.0

The price expressed in unit u, e.g. Price(1.02, PriceUnit.One).in(PriceUnit.Pts) == 102.0

Attributes

extension (xs: Array[Price])
def +(ys: Array[_ <: Rel]): Array[Price]
def -(ys: Array[_ <: Rel]): Array[Price]
def -(ys: Array[Price]): Array[Rel]
def /(ys: Array[Price]): Array[Double]
def canonical: Array[Double]