distance(b)
    {
        const x = b.x - this.x;
        const y = b.y - this.y;

        return Math.sqrt((x * x) + (y * y));
    }
/**
     * Calculates the euclidian distance between the passed vector and this one.
     *
     * @param {Vector2d} b - the operand to calculate distance to.
     * @return {number} distance between this vector and b.
     */
Calculates the euclidian distance between the passed vector and this one.
@param {Vector2d} b - the operand to calculate distance to.
@return {number} distance between this vector and b.
Calculates the euclidian distance between the passed vector and this one . @param { Vector2d } b - the operand to calculate distance to . @return { number } distance between this vector and b .
distance(b)
    {
        const x = b.x - this.x;
        const y = b.y - this.y;
        return Math.sqrt((x * x) + (y * y));
    }
distance ( b ) { const x = b . x - this . x ; const y = b . y - this . y ; return Math . sqrt ( ( x * x ) + ( y * y ) ) ; }
Calculates the euclidian distance between the passed vector and this one.
Calculates the euclidian distance between the passed vector and this one .