20 #include <ripple/protocol/Quality.h>
21 #include <ripple/protocol/Rate.h>
32 return {
noIssue(), rate.value, -9,
false};
49 assert(rate.value != 0);
60 assert(rate.value != 0);
75 assert(rate.value != 0);
88 assert(rate.value != 0);
99 assert(rate.value != 0);
114 assert(rate.value != 0);
A currency issued by an account.
Represents a transfer rate.
Issue const & issue() const
Rate transferFeeAsRate(std::uint16_t fee)
Given a transfer fee (in basis points) convert it to a transfer rate.
STAmount multiplyRound(STAmount const &amount, Rate const &rate, bool roundUp)
Issue const & noIssue()
Returns an asset specifier that represents no account and currency.
STAmount divideRound(STAmount const &amount, Rate const &rate, bool roundUp)
const Rate parityRate(QUALITY_ONE)
A transfer rate signifying a 1:1 exchange.
STAmount mulRound(STAmount const &v1, STAmount const &v2, Issue const &issue, bool roundUp)
STAmount divide(STAmount const &amount, Rate const &rate)
STAmount divRound(STAmount const &num, STAmount const &den, Issue const &issue, bool roundUp)
STAmount multiply(STAmount const &amount, Rate const &rate)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
STAmount as_amount(Rate const &rate)