summaryrefslogtreecommitdiff
path: root/src/number.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-05-09 15:44:34 -0600
committerMike Buland <mike@xagasoft.com>2013-05-09 15:44:34 -0600
commit0e5e01b4d0d5f3f872d97c95bd57fd057e4fd5a1 (patch)
tree1e6a657c57ceeda4d699f1f0b55ad033e3cacf7b /src/number.h
parentce68e816bd82612c14f3492e8bc969da9bfab06c (diff)
downloadclic-0e5e01b4d0d5f3f872d97c95bd57fd057e4fd5a1.tar.gz
clic-0e5e01b4d0d5f3f872d97c95bd57fd057e4fd5a1.tar.bz2
clic-0e5e01b4d0d5f3f872d97c95bd57fd057e4fd5a1.tar.xz
clic-0e5e01b4d0d5f3f872d97c95bd57fd057e4fd5a1.zip
Added Number::toRadix & Number::set( int32_t ).
Both very handy. I'll add other numeric setters later, it was very easy.
Diffstat (limited to '')
-rw-r--r--src/number.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/number.h b/src/number.h
index 8077fe0..2abf0e1 100644
--- a/src/number.h
+++ b/src/number.h
@@ -31,6 +31,7 @@ public:
31 31
32 void set( const Bu::String &sNum ); 32 void set( const Bu::String &sNum );
33 void set( const Number &sNum ); 33 void set( const Number &sNum );
34 void set( int32_t iNum );
34 35
35 void divide( const Number &rhs, Number &q, Number &r ) const; 36 void divide( const Number &rhs, Number &q, Number &r ) const;
36 bool isZero() const; 37 bool isZero() const;
@@ -48,6 +49,7 @@ public:
48 void setScale( int iNewScale ); 49 void setScale( int iNewScale );
49 50
50 int32_t toInt32() const; 51 int32_t toInt32() const;
52 Number toRadix( int iNewRadix, int iNewScale=-1 ) const;
51 53
52private: 54private:
53 Number add( const Number &rhs, bool bSub ) const; 55 Number add( const Number &rhs, bool bSub ) const;