JavaScript-UI-and-DOM/Workshops/Canvas-and-SVG/05.08.2016 - Jumping Pikachu/src/js/physics.js
// moves the caller(using the coordinates and speed properties of the caller) and return the coordinates before moving
moves the caller(using the coordinates and speed properties of the caller) and return the coordinates before moving
moves the caller ( using the coordinates and speed properties of the caller ) and return the coordinates before moving
function move(delta) {
        var self = this,
            last = JSON.parse(JSON.stringify(self.coordinates));
        self.coordinates = { 
            x: self.coordinates.x + self.speed.x * delta.x, 
            y: self.coordinates.y + self.speed.y * delta.y
        };
        return last;
    }
function move ( delta ) { var self = this , last = JSON . parse ( JSON . stringify ( self . coordinates ) ) ; self . coordinates = { x : self . coordinates . x + self . speed . x * delta . x , y : self . coordinates . y + self . speed . y * delta . y } ; return last ; }
moves the caller(using the coordinates and speed properties of the caller) and return the coordinates before moving
moves the caller ( using the coordinates and speed properties of the caller ) and return the coordinates before moving