Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: BigInt.cpp
- Revision:
- 2:1001793a090d
- Parent:
- 1:00f2c40d46ed
- Child:
- 3:3fa3ceb0c69d
--- a/BigInt.cpp Fri Sep 20 15:45:22 2013 +0000
+++ b/BigInt.cpp Fri Sep 20 15:50:25 2013 +0000
@@ -22,6 +22,20 @@
{
}
+BigInt::BigInt(const uint32_t a)
+{
+ if(a >> 24)
+ size = 4;
+ else if(a >> 16)
+ size = 3;
+ else if(a >> 8)
+ size = 2;
+ else
+ size = 1;
+ bits = new uint32_t[1];
+ bits[0] = a;
+}
+
BigInt::BigInt(const BigInt &a):
size(a.size)
{