Documentation ¶
Index ¶
- type Price
- func (p Price) Add(other Price) Price
- func (p Price) Delta(other Price) Price
- func (p Price) Div(other Price) Price
- func (p Price) Float64() float64
- func (p Price) LeftShift(by uint) Price
- func (p Price) Mul(other Price) Price
- func (p Price) RightShift(by uint) Price
- func (p Price) String() string
- func (p Price) Sub(other Price) Price
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Price ¶
type Price int64
Price is a fixed-point value that can represent prices and safely be used for math.
func (Price) Float64 ¶
Float64 returns a float64 form of the price by dividing the price by the basis.
func (Price) RightShift ¶
RightShift implements << for prices.
Click to show internal directories.
Click to hide internal directories.