2014-03-29 21:43:22 +01:00

20 lines
459 B
JavaScript

module.exports = {
'name': 'compare',
'category': 'Operators',
'syntax': [
'compare(x, y)'
],
'description':
'Compare two values. Returns 1 if x is larger than y, -1 if x is smaller than y, and 0 if x and y are equal.',
'examples': [
'compare(2, 3)',
'compare(3, 2)',
'compare(2, 2)',
'compare(5cm, 40mm)',
'compare(2, [1, 2, 3])'
],
'seealso': [
'equal', 'unequal', 'smaller', 'smallereq', 'largereq'
]
};