mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
21 lines
369 B
JavaScript
21 lines
369 B
JavaScript
module.exports = {
|
|
'name': 'mod',
|
|
'category': 'Operators',
|
|
'syntax': [
|
|
'x % y',
|
|
'x mod y',
|
|
'mod(x, y)'
|
|
],
|
|
'description':
|
|
'Calculates the modulus, the remainder of an integer division.',
|
|
'examples': [
|
|
'7 % 3',
|
|
'11 % 2',
|
|
'10 mod 4',
|
|
'function isOdd(x) = x % 2',
|
|
'isOdd(2)',
|
|
'isOdd(3)'
|
|
],
|
|
'seealso': ['divide']
|
|
};
|