UNPKG

@pixi/utils

Version:

Collection of utilities used by PixiJS

1 lines 593 B
{"version":3,"file":"sign.mjs","sources":["../../src/data/sign.ts"],"sourcesContent":["/**\n * Returns sign of number\n * @memberof PIXI.utils\n * @function sign\n * @param {number} n - the number to check the sign of\n * @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive\n */\nexport function sign(n: number): -1 | 0 | 1\n{\n if (n === 0) return 0;\n\n return n < 0 ? -1 : 1;\n}\n"],"names":[],"mappings":"AAOO,SAAA,IAAA,CAAc,CACrB,EAAA;AACI,EAAA,IAAI,CAAM,KAAA,CAAA;AAAG,IAAO,OAAA,CAAA,CAAA;AAEpB,EAAO,OAAA,CAAA,GAAI,IAAI,CAAK,CAAA,GAAA,CAAA,CAAA;AACxB;;;;"}