Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,14 @@ <h6>operators</h6>
a - b -- sub
a * b -- mul
a / b -- div
a \ b -- integer div
a % b -- mod
a ^ b -- pow
a += b -- sum to
a -= b -- sub to
a *= b -- mul to
a /= b -- div to
a \= b -- integer div to
a %= b -- mod to
a ^= b -- pow to
a == b -- compare equals
Expand Down Expand Up @@ -498,6 +500,9 @@ <h6>metatables :: mathematic operators</h6>
-- division; returned by 'a / b'
function mt.__div(a, b) return a / b end

-- integer division; returned by 'a \ b'
function mt.__idiv(a, b) return a \ b end

-- modulo; returned by 'a % b'
function mt.__mod(a, b) return a % b end

Expand Down