Newlyweds Proposing Marriage
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    fractpublic

    fract

    Get the fractional part of a floating point value

    Usage:

    var fract = require('fract');
    
    fract(3.5) === 0.5
    fract(-3.5) === 0.5
    

    The fractional part returned is always positive, and is equal to the original value added or subtracted from the truncated integer value (x|0). More examples in test.js.

    License

    MIT

    install

    npm i fract

    Downloadsweekly downloads

    3

    version

    0.1.0

    license

    MIT

    homepage

    github.com

    last publish

    collaborators

    • avatar