Class SandboxInt32Math
Namespace: DotBoxD.Kernels.Sandbox
Assembly: DotBoxD.Kernels.dll
Checked 32-bit integer arithmetic with sandbox error semantics. Overflow is detected with branchless
bit tests (no closures, no try/catch) so each operation is allocation-free and inlineable on the
compiler’s unboxed fast path and the interpreter alike. Every overflow / divide-by-zero raises the same
DotBoxD.Kernels.Sandbox.SandboxErrorCode.InvalidInput error as before.
public static class SandboxInt32MathInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”Add(int, int)
Section titled “ Add(int, int)”public static int Add(int left, int right)Parameters
Section titled “Parameters”left int
right int
Returns
Section titled “Returns”Divide(int, int)
Section titled “ Divide(int, int)”public static int Divide(int left, int right)Parameters
Section titled “Parameters”left int
right int
Returns
Section titled “Returns”Multiply(int, int)
Section titled “ Multiply(int, int)”public static int Multiply(int left, int right)Parameters
Section titled “Parameters”left int
right int
Returns
Section titled “Returns”Negate(int)
Section titled “ Negate(int)”public static int Negate(int value)Parameters
Section titled “Parameters”value int
Returns
Section titled “Returns”Remainder(int, int)
Section titled “ Remainder(int, int)”public static int Remainder(int left, int right)Parameters
Section titled “Parameters”left int
right int
Returns
Section titled “Returns”Subtract(int, int)
Section titled “ Subtract(int, int)”public static int Subtract(int left, int right)Parameters
Section titled “Parameters”left int
right int