Skip to content

Commit

Permalink
Merge pull request #66 from AvicennaJr/develop
Browse files Browse the repository at this point in the history
fix: modulus operation between float and int
  • Loading branch information
AvicennaJr authored Oct 11, 2023
2 parents 43f2b23 + d1e8539 commit 0779358
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions evaluator/infix.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ func evalFloatIntegerInfixExpression(operator string, left, right object.Object,
val = math.Pow(float64(leftVal), float64(rightVal))
case "/":
val = leftVal / rightVal
case "%":
val = math.Mod(leftVal, rightVal)
case "<":
return nativeBoolToBooleanObject(leftVal < rightVal)
case "<=":
Expand Down

0 comments on commit 0779358

Please sign in to comment.