3#include <xrpl/protocol/IOUAmount.h>
4#include <xrpl/protocol/STAmount.h>
5#include <xrpl/protocol/XRPAmount.h>
14 bool const isNeg = iou.
signum() < 0;
28 bool const isNeg = xrp.
signum() < 0;
60 XRPL_ASSERT(!
isXRP(amt),
"xrpl::toAmount<IOUAmount> : is not XRP");
73 XRPL_ASSERT(
isXRP(amt),
"xrpl::toAmount<XRPAmount> : is XRP");
120 static_assert(alwaysFalse,
"Unsupported type for toAmount");
141 static_assert(alwaysFalse,
"Unsupported type for toMaxAmount");
164 static_assert(alwaysFalse,
"Unsupported type for getIssue");
181 static_assert(alwaysFalse,
"Unsupported type for get");
Floating point representation of amounts with high dynamic range.
mantissa_type mantissa() const noexcept
exponent_type exponent() const noexcept
int signum() const noexcept
Return the sign of the amount.
A currency issued by an account.
Number is a floating point type that can represent a wide range of values.
static rounding_mode getround()
static rounding_mode setround(rounding_mode mode)
static constexpr std::uint64_t cMaxValue
std::uint64_t mantissa() const noexcept
bool negative() const noexcept
static int const cMaxOffset
int exponent() const noexcept
static constexpr std::uint64_t cMaxNativeN
constexpr value_type drops() const
Returns the number of drops.
constexpr int signum() const noexcept
Return the sign of the amount.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
bool isXRP(AccountID const &c)
T get(Section const §ion, std::string const &name, T const &defaultValue=T{})
Retrieve a key/value pair from a section.
STAmount toSTAmount(IOUAmount const &iou, Issue const &iss)
T toAmount(STAmount const &amt)=delete
XRPAmount toAmount< XRPAmount >(STAmount const &amt)
T toMaxAmount(Issue const &issue)
IOUAmount toAmount< IOUAmount >(STAmount const &amt)
Issue const & noIssue()
Returns an asset specifier that represents no account and currency.
Issue getIssue(T const &amt)
STAmount toAmount< STAmount >(STAmount const &amt)