mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
23 lines
420 B
JavaScript
23 lines
420 B
JavaScript
'use strict';
|
|
|
|
function factory () {
|
|
|
|
/**
|
|
* This function "flips" its input about the integer -1.
|
|
*
|
|
* @param {Number} i The value to flip
|
|
*
|
|
* Reference: http://faculty.cse.tamu.edu/davis/publications.html
|
|
*/
|
|
var cs_flip = function (i) {
|
|
// flip the value
|
|
return -i - 2;
|
|
};
|
|
|
|
return cs_flip;
|
|
}
|
|
|
|
exports.name = 'cs_flip';
|
|
exports.path = 'sparse';
|
|
exports.factory = factory;
|