Preparing search index...
The search index is not available
lootex - v0.2.0
lootex
utils
UsdPrice
Class UsdPrice<T>
Type Parameters
T
extends
Token
=
Token
Hierarchy (
view full
)
Price
UsdPrice
Index
Constructors
constructor
Properties
base
Currency
denominator
numerator
quote
Currency
scalar
Methods
add
divide
equal
To
greater
Than
invert
less
Than
multiply
quote
quotient
subtract
to
Fixed
to
Significant
from
Currency
Amounts
from
Decimal
is
Fraction
to
Fraction
Constructors
constructor
new
Usd
Price
<
T
>
(
rate
,
baseCurrency
)
:
UsdPrice
<
T
>
Type Parameters
T
extends
Token
=
Token
Parameters
rate
:
string
|
number
baseCurrency
:
T
Returns
UsdPrice
<
T
>
Properties
Readonly
base
Currency
base
Currency
:
Token
Readonly
denominator
denominator
:
bigint
Readonly
numerator
numerator
:
bigint
Readonly
quote
Currency
quote
Currency
:
Token
Readonly
scalar
scalar
:
Fraction
Methods
add
add
(
other
)
:
Fraction
Parameters
other
:
BigintIsh
|
Fraction
Returns
Fraction
divide
divide
(
other
)
:
Fraction
Parameters
other
:
BigintIsh
|
Fraction
Returns
Fraction
equal
To
equal
To
(
other
)
:
boolean
Parameters
other
:
BigintIsh
|
Fraction
Returns
boolean
greater
Than
greater
Than
(
other
)
:
boolean
Parameters
other
:
BigintIsh
|
Fraction
Returns
boolean
invert
invert
(
)
:
Fraction
Returns
Fraction
less
Than
less
Than
(
other
)
:
boolean
Parameters
other
:
BigintIsh
|
Fraction
Returns
boolean
multiply
multiply
(
other
)
:
Fraction
Parameters
other
:
BigintIsh
|
Fraction
Returns
Fraction
quote
quote
(
baseCurrencyAmount
?
)
:
CurrencyAmount
<
Token
>
Parameters
baseCurrencyAmount
:
CurrencyAmount
<
Token
>
= ...
Returns
CurrencyAmount
<
Token
>
quotient
quotient
(
)
:
bigint
Returns
bigint
subtract
subtract
(
other
)
:
Fraction
Parameters
other
:
BigintIsh
|
Fraction
Returns
Fraction
to
Fixed
to
Fixed
(
decimalPlaces
?
,
rounding
?
)
:
string
Parameters
decimalPlaces
:
number
= 8
Optional
rounding
:
Rounding
Returns
string
to
Significant
to
Significant
(
significantDigits
?
,
rounding
?
)
:
string
Parameters
significantDigits
:
number
= 8
Optional
rounding
:
Rounding
Returns
string
Static
from
Currency
Amounts
from
Currency
Amounts
(
baseCurrencyAmount
,
quoteCurrencyAmount
)
:
Price
<
Token
,
Token
>
Parameters
baseCurrencyAmount
:
CurrencyAmount
<
Token
>
quoteCurrencyAmount
:
CurrencyAmount
<
Token
>
Returns
Price
<
Token
,
Token
>
Static
from
Decimal
from
Decimal
(
decimalStr
)
:
Fraction
Parameters
decimalStr
:
string
|
number
Returns
Fraction
Static
is
Fraction
is
Fraction
(
value
)
:
value
is
Fraction
Parameters
value
:
unknown
Returns
value
is
Fraction
Static
to
Fraction
to
Fraction
(
fractionish
)
:
Fraction
Parameters
fractionish
:
BigintIsh
|
Fraction
Returns
Fraction
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
base
Currency
denominator
numerator
quote
Currency
scalar
Methods
add
divide
equal
To
greater
Than
invert
less
Than
multiply
quote
quotient
subtract
to
Fixed
to
Significant
from
Currency
Amounts
from
Decimal
is
Fraction
to
Fraction
lootex - v0.2.0
Loading...