src/physics/body.js
function (vel) {
            var fx = this.friction.x * me.timer.tick,
                nx = vel.x + fx,
                x = vel.x - fx,
                fy = this.friction.y * me.timer.tick,
                ny = vel.y + fy,
                y = vel.y - fy;

            vel.x = (
                (nx < 0) ? nx :
                ( x > 0) ? x  : 0
            );
            vel.y = (
                (ny < 0) ? ny :
                ( y > 0) ? y  : 0
            );
        }
function (vel) {
            var fx = this.friction.x * me.timer.tick,
                nx = vel.x + fx,
                x = vel.x - fx,
                fy = this.friction.y * me.timer.tick,
                ny = vel.y + fy,
                y = vel.y - fy;

            vel.x = (
                (nx < 0) ? nx :
                ( x > 0) ? x  : 0
            );
            vel.y = (
                (ny < 0) ? ny :
                ( y > 0) ? y  : 0
            );
        }
function ( vel ) { var fx = this . friction . x * me . timer . tick , nx = vel . x + fx , x = vel . x - fx , fy = this . friction . y * me . timer . tick , ny = vel . y + fy , y = vel . y - fy ; vel . x = ( ( nx < 0 ) ? nx : ( x > 0 ) ? x : 0 ) ; vel . y = ( ( ny < 0 ) ? ny : ( y > 0 ) ? y : 0 ) ; }
apply friction to a vector
@ignore
apply friction to a vector