code: void dtNormalize2D(float[] v) {
          float d = (float) Math.sqrt(v[0] * v[0] + v[2] * v[2]);
          if (d == 0)
              return;
          d = 1.0f / d;
          v[0] *= d;
          v[2] *= d;
      }
docs: vector normalization that ignores the y-component.