pagraphcontrol/utils/plus-minus.js
2018-11-08 20:39:54 +03:00

5 lines
99 B
JavaScript

const plusMinus = i => Math.ceil(i / 2) * ((2 * ((i + 1) % 2)) - 1);
module.exports = plusMinus;