getGradient() {
    if (this.x !== 0) return Math.atan2(this.y, this.x);
    else if (this.y > 0) return MathUtil.PI_2;
    else if (this.y < 0) return -MathUtil.PI_2;
  }
Calculates the gradient (angle) of this vector.
@returns {number} The gradient in radians.