build/SPE.js
function( value, randomise ) {
        'use strict';

        var epsilon = 0.00001,
            result = value;

        result = randomise ? Math.random() * epsilon * 10 : epsilon;

        if ( value < 0 && value > -epsilon ) {
            result = -result;
        }

        // if ( value === 0 ) {
        //     result = randomise ? Math.random() * epsilon * 10 : epsilon;
        // }
        // else if ( value > 0 && value < epsilon ) {
        //     result = randomise ? Math.random() * epsilon * 10 : epsilon;
        // }
        // else if ( value < 0 && value > -epsilon ) {
        //     result = -( randomise ? Math.random() * epsilon * 10 : epsilon );
        // }

        return result;
    }
function( value, randomise ) {
        'use strict';

        var epsilon = 0.00001,
            result = value;

        result = randomise ? Math.random() * epsilon * 10 : epsilon;

        if ( value < 0 && value > -epsilon ) {
            result = -result;
        }

        // if ( value === 0 ) {
        //     result = randomise ? Math.random() * epsilon * 10 : epsilon;
        // }
        // else if ( value > 0 && value < epsilon ) {
        //     result = randomise ? Math.random() * epsilon * 10 : epsilon;
        // }
        // else if ( value < 0 && value > -epsilon ) {
        //     result = -( randomise ? Math.random() * epsilon * 10 : epsilon );
        // }

        return result;
    }
function ( value , randomise ) { 'use strict' ; var epsilon = 0.00001 , result = value ; result = randomise ? Math . random ( ) * epsilon * 10 : epsilon ; if ( value < 0 && value > - epsilon ) { result = - result ; } // if ( value === 0 ) { //     result = randomise ? Math.random() * epsilon * 10 : epsilon; // } // else if ( value > 0 && value < epsilon ) { //     result = randomise ? Math.random() * epsilon * 10 : epsilon; // } // else if ( value < 0 && value > -epsilon ) { //     result = -( randomise ? Math.random() * epsilon * 10 : epsilon ); // } return result ; }
If the given value is less than the epsilon value, then return
a randomised epsilon value if specified, or just the epsilon value if not.
Works for negative numbers as well as positive.

@param  {Number} value     The value to perform the operation on.
@param  {Boolean} randomise Whether the value should be randomised.
@return {Number}           The result of the operation.
If the given value is less than the epsilon value then return a randomised epsilon value if specified or just the epsilon value if not . Works for negative numbers as well as positive .