What does this function do?

Point.prototype.distanceAngle = function (dist, angle) {
    var deg = angle, x, y;
    if (deg > 270) {
        deg = deg - 360;
    } else if (deg < -270) {
        deg = deg + 360;
    }
    if (-90 <= deg && deg <= 90) {
        x = Math.sin(radians(deg)) * dist;
        y = Math.sqrt((dist * dist) - (x * x));
        return new Point(x + this.x, this.y - y);
    }
    x = Math.sin(radians(180 - deg)) * dist;
    y = Math.sqrt((dist * dist) - (x * x));
    return new Point(x + this.x, this.y + y);
};

I found it in morphic.js: morphic.js, lines 2545 to 2560

It looks to me as if it does a MOVE dist STEPS by constructing a new point that's where the sprite will end up after the move.

Ah. I'll try it in Snap! to see if you're right.

Edit: Snap! 6.9.2 Build Your Own Blocks

Could not fetch project Distenceangle?

Sorry, it wasn't shared. It's shared now.