Xpace
Xpace::DecimalFloat Class Reference

A floatimg-point number with explicit mantissa and decimals TODO: normalize. More...

#include <decimalfloat.h>

Public Member Functions

 DecimalFloat (const String8 &str, uint precision=~0)
 
 DecimalFloat (const String16 &str, uint precision=~0)
 
 DecimalFloat (const String &str, uint precision=~0)
 
 DecimalFloat (int64 mantissa=0, int decimals=0)
 

=========================================================

========================================================= More...
 
 DecimalFloat (double val)
 
 operator double () const
 
int64 getMantissa () const
 
int getDecimals () const
 
int compare (const DecimalFloat &rhs) const
 
bool operator== (const DecimalFloat &rhs) const
 
bool operator!= (const DecimalFloat &rhs) const
 
bool operator< (const DecimalFloat &rhs) const
 
bool operator<= (const DecimalFloat &rhs) const
 
bool operator> (const DecimalFloat &rhs) const
 
bool operator>= (const DecimalFloat &rhs) const
 
template<typename STR >
bool toRawString (STR *str, typename STR::charType decimalChar= '.') const
 
String toString (utf16_t decimalChar= '.') const
 

Detailed Description

A floatimg-point number with explicit mantissa and decimals TODO: normalize.

Definition at line 33 of file decimalfloat.h.

Constructor & Destructor Documentation

Xpace::DecimalFloat::DecimalFloat ( const String8 str,
uint  precision = ~0 
)
inline

Definition at line 159 of file decimalfloat.h.

Referenced by DecimalFloat(), operator<(), and toString().

Xpace::DecimalFloat::DecimalFloat ( const String16 str,
uint  precision = ~0 
)
inline

Definition at line 169 of file decimalfloat.h.

References DecimalFloat().

Xpace::DecimalFloat::DecimalFloat ( const String str,
uint  precision = ~0 
)
inline
Xpace::DecimalFloat::DecimalFloat ( int64  mantissa = 0,
int  decimals = 0 
)
inline

=========================================================

=========================================================

Definition at line 150 of file decimalfloat.h.

References DecimalFloat().

Xpace::DecimalFloat::DecimalFloat ( double  val)
inline

Definition at line 298 of file decimalfloat.h.

References DecimalFloat(), len, and Xpace::sprintf_s().

Member Function Documentation

Xpace::DecimalFloat::operator double ( ) const
inline

Definition at line 308 of file decimalfloat.h.

References compare(), and Xpace::pow10_64().

int64 Xpace::DecimalFloat::getMantissa ( ) const
inline

Definition at line 58 of file decimalfloat.h.

References getDecimals().

int Xpace::DecimalFloat::getDecimals ( ) const
inline

Definition at line 65 of file decimalfloat.h.

References compare().

Referenced by getMantissa().

int Xpace::DecimalFloat::compare ( const DecimalFloat rhs) const
inline

Definition at line 316 of file decimalfloat.h.

References Xpace::pow10_64().

Referenced by getDecimals(), operator double(), and operator<().

bool Xpace::DecimalFloat::operator== ( const DecimalFloat rhs) const
inline

Definition at line 339 of file decimalfloat.h.

References Xpace::pow10_64().

bool Xpace::DecimalFloat::operator!= ( const DecimalFloat rhs) const
inline

Definition at line 351 of file decimalfloat.h.

bool Xpace::DecimalFloat::operator< ( const DecimalFloat rhs) const
inline
bool Xpace::DecimalFloat::operator<= ( const DecimalFloat rhs) const
bool Xpace::DecimalFloat::operator> ( const DecimalFloat rhs) const
bool Xpace::DecimalFloat::operator>= ( const DecimalFloat rhs) const
template<typename STR >
bool Xpace::DecimalFloat::toRawString ( STR *  str,
typename STR::charType  decimalChar = '.' 
) const
inline

Definition at line 189 of file decimalfloat.h.

References len, and toString().

Referenced by DecimalFloat(), operator<(), and toString().

String Xpace::DecimalFloat::toString ( utf16_t  decimalChar = '.') const
inline

The documentation for this class was generated from the following file:

current as of Wed Jun 10 2026 12:00:06