Skip to content

Commit

Permalink
Made Modulus return a double
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobMisirian committed Sep 24, 2015
1 parent b6decf1 commit 0bda4e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hassium/Interpreter/Interpreter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ private HassiumObject interpretBinaryOp(object left, object right, BinaryOperati
case BinaryOperation.BitshiftRight:
return new HassiumInt(Convert.ToInt32(left) >> Convert.ToInt32(right));
case BinaryOperation.Modulus:
return new HassiumInt(Convert.ToInt32(left) % Convert.ToInt32(right));
return new HassiumDouble(Convert.ToDouble(left) % Convert.ToDouble(right));

case BinaryOperation.Pow:
if (left is HassiumInt && right is HassiumInt)
Expand Down

0 comments on commit 0bda4e8

Please sign in to comment.