code: @Override
    public double distance(NumberVector v1, NumberVector v2) {
      final double v = VectorUtil.dot(v1, v2);
      return v < 1 ? (v > -1 ? Math.acos(v) : 1) : 0;
    }
docs: Computes the cosine distance for two given feature vectors.
  <p>
  The cosine distance is computed as the arcus from the cosine similarity
  value, i.e., <code>arccos(&lt;v1,v2&gt;)</code>.
  
  @param v1 first feature vector
  @param v2 second feature vector
  @return the cosine distance for two given feature vectors v1 and v2