UNPKG

@atlaskit/tokens

Version:

Design tokens are the single source of truth to name and store design decisions.

20 lines (19 loc) 322 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.signum = signum; /** * The signum function. * * @return 1 if num > 0, -1 if num < 0, and 0 if num = 0 */ function signum(num) { if (num < 0) { return -1; } else if (num === 0) { return 0; } else { return 1; } }