/**
 * compute the fractional part of the argument
 * GLSL "fract" function port
 * @see https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/fract.xhtml
 * @param {number} v
 * @returns {number} returns the fractional part of x. This is calculated as x - floor(x).
 */
export function fract(v) {
    const whole = v >> 0; // fast way to cut off fraction

    return v - whole;
}
