length(v) {
        var x = v[0];
        var y = v[1];
        return Math.sqrt(x * x + y * y);
      }
/**
       * Calculates the length of a vector2
       *
       * @param {vector2} v vector to calculate length of
       * @return {Number} length of v
       */
Calculates the length of a vector2
@param {vector2} v vector to calculate length of
@return {Number} length of v
Calculates the length of a vector2 @param { vector2 } v vector to calculate length of @return { Number } length of v
length(v) {
        var x = v[0];
        var y = v[1];
        return Math.sqrt(x * x + y * y);
      }
length ( v ) { var x = v [ 0 ] ; var y = v [ 1 ] ; return Math . sqrt ( x * x + y * y ) ; }
Calculates the length of a vector2
 @param {vector2} v vector to calculate length of
 @return {Number} length of v
Calculates the length of a vector2 @param { vector2 } v vector to calculate length of @return { Number } length of v