aboutsummaryrefslogtreecommitdiff
path: root/dotnet/Mammoth/Couscous/java/math
diff options
context:
space:
mode:
Diffstat (limited to 'dotnet/Mammoth/Couscous/java/math')
-rw-r--r--dotnet/Mammoth/Couscous/java/math/BigInteger.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/dotnet/Mammoth/Couscous/java/math/BigInteger.cs b/dotnet/Mammoth/Couscous/java/math/BigInteger.cs
new file mode 100644
index 0000000..40ac3d3
--- /dev/null
+++ b/dotnet/Mammoth/Couscous/java/math/BigInteger.cs
@@ -0,0 +1,24 @@
+namespace Mammoth.Couscous.java.math {
+ internal class BigInteger {
+ internal static readonly BigInteger _ONE = new BigInteger(1);
+
+ // TOOD: use proper BigInteger
+ private readonly long _value;
+
+ internal BigInteger(string value) {
+ _value = long.Parse(value);
+ }
+
+ internal BigInteger(long value) {
+ _value = value;
+ }
+
+ internal BigInteger subtract(BigInteger other) {
+ return new BigInteger(_value - other._value);
+ }
+
+ internal string toString() {
+ return _value.ToString();
+ }
+ }
+}