Replace stupid 'mod' with 'and'
authorunc0rr
Fri, 20 Jul 2012 18:42:45 +0400
changeset 7405 63f56edae4c6
parent 7404 38a23771ee45
child 7406 1fe2c821f9bf
Replace stupid 'mod' with 'and'
hedgewars/uGearsHandlers.pas
--- a/hedgewars/uGearsHandlers.pas	Fri Jul 20 15:39:13 2012 +0100
+++ b/hedgewars/uGearsHandlers.pas	Fri Jul 20 18:42:45 2012 +0400
@@ -35,12 +35,12 @@
 
 procedure PrevAngle(Gear: PGear; dA: LongInt); inline;
 begin
-    Gear^.Angle := (LongInt(Gear^.Angle) + 4 - dA) mod 4
+    Gear^.Angle := (Gear^.Angle - dA) and 3
 end;
 
 procedure NextAngle(Gear: PGear; dA: LongInt); inline;
 begin
-    Gear^.Angle := (LongInt(Gear^.Angle) + 4 + dA) mod 4
+    Gear^.Angle := (Gear^.Angle + dA) and 3
 end;
 
 procedure cakeStep(Gear: PGear);