Cheddar Documentation
Search
⌃
K
Cheddar Documentation
Search
⌃
K
Introduction
Syntax
Literals
Mathematics
Addition
Subtraction
Multiplication
Division
Exponentiation
Remainder
Negation
Sign
Root
Bitwise AND
Bitwise OR
Bitwise XOR
Bitwise NOT
Bitwise Left Shift
Bitwise Right Shift
Variables
Functions
Default Operators
Control Flow
Standard Library
Developing
Powered By
GitBook
Remainder
Syntax
x
%
y
Explanation
The remainder operator returns the remainder left over after division of the two operands. The sign of the dividend is taken rather than the divisor making it different from a
modulus
function.
Examples
16
%
16
// 0
17
%
16
// 1
18
%
16
// 2
-
16
%
16
// 0
Previous
Exponentiation
Next
Negation
Last modified
3yr ago