Skip to content

Commit 8953802

Browse files
committed
Merge branch 'main' of https://github.com/AvicennaJr/Nuru
2 parents b2fedea + 0779358 commit 8953802

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

evaluator/infix.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ func evalFloatIntegerInfixExpression(operator string, left, right object.Object,
117117
val = math.Pow(float64(leftVal), float64(rightVal))
118118
case "/":
119119
val = leftVal / rightVal
120+
case "%":
121+
val = math.Mod(leftVal, rightVal)
120122
case "<":
121123
return nativeBoolToBooleanObject(leftVal < rightVal)
122124
case "<=":

0 commit comments

Comments
 (0)