UNPKG

@litecanvas/utils

Version:

Utilities to help build litecanvas games

10 lines (9 loc) 192 B
/** * Returns the fractional part of a number * * @param {number} value The number * @returns {number} * @example * fract(10.1) // => 0.1 */ export default (value) => value % 1 || 0