using System; using System.Collections.Generic; using System.Text; using DNAModule.Sunweaver.Commands.Attributes; namespace DNAModule.Sunweaver.Commands.BinaryMath { /// /// Mod returns the remainder after division. It follows this formula: /// a b div = result /// a b mod = remainder /// /// result * b + remainder = a /// [BasePair] public class mod : Abstracts.BinaryOperation { public override void Operation(long a, long b) { if (b != 0) VM.Stack.Push(a % b); else VM.Stack.Push(a); } } }