Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Introduced in

Version:3.10

Description

Description:

Remainder of a divided by b.

If the remainder is negative, then modular arithmetic is used to determine the final result (returns b-result if b > 0, or result-b if b < 0).

For more information, see:

Scroll Ignore


Scroll Only
  • Modular Arithmetic (https://en.wikipedia.org/wiki/Modular_arithmetic)


Syntax

Syntax:a %% b
Parameters:
Return Value:Number

Examples

Examples:
4.5 %% 3; // Result is 1.5
17 %% -10; // Result is 3

Additional Information

See also: mod, a % b
Multiplayer:
Problems:

Notes