Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Rossetto committed May 7, 2022
1 parent a7efc26 commit 96051c6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ sealed class CosineDistance<T : VectorValue<*>>(type: Types.Vector<T,*>): Vector
normq += query.data[i].pow(2)
normv += probing.data[i].pow(2)
}
return DoubleValue(1d - (dotp / (sqrt(normq) * sqrt(normv))))
return DoubleValue(1.0 - (dotp / (sqrt(normq) * sqrt(normv))))
}
override fun copy(d: Int) = DoubleVector(Types.DoubleVector(d))
}
Expand All @@ -92,7 +92,7 @@ sealed class CosineDistance<T : VectorValue<*>>(type: Types.Vector<T,*>): Vector
normq += query.data[i].pow(2)
normv += probing.data[i].pow(2)
}
return DoubleValue(1d - (dotp / (sqrt(normq) * sqrt(normv))))
return DoubleValue(1.0 - (dotp / (sqrt(normq) * sqrt(normv))))
}
override fun copy(d: Int) = FloatVector(Types.FloatVector(d))
}
Expand Down

0 comments on commit 96051c6

Please sign in to comment.