From ec5037c01868fecaec2eba89b975f3e53aded89a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 30 Apr 2016 17:20:53 +0100 Subject: Export from java-mammoth 5f538798b147f0e76 --- Mammoth/Couscous/java/math/BigInteger.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Mammoth/Couscous/java/math/BigInteger.cs (limited to 'Mammoth/Couscous/java/math/BigInteger.cs') diff --git a/Mammoth/Couscous/java/math/BigInteger.cs b/Mammoth/Couscous/java/math/BigInteger.cs new file mode 100644 index 0000000..40ac3d3 --- /dev/null +++ b/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(); + } + } +} -- cgit v1.2.3