darklua
DocumentationTry itGitHub

remove_floor_division


Added in 0.14.1

This rule removes all usage of the floor division operator (//). It replaces those operations with a regular division (/) followed by a math.floor() call.

Examples


return variable // divider
variable //= 5
InputOutput
return variable // divider
return math.floor(variable / divider)
variable //= 5
variable =math.floor(variable/ 5)