Skip to content

Commit 43c272f

Browse files
author
shengjun.li
authored
fix annoy l2 (#3232)
Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
1 parent f9f597b commit 43c272f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/index/thirdparty/annoy/src/annoylib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ struct Euclidean : Minkowski {
783783
}
784784
template<typename T>
785785
static inline T normalized_distance(T distance) {
786-
return sqrt(std::max(distance, T(0)));
786+
return distance;
787787
}
788788
template<typename S, typename T>
789789
static inline void init_node(Node<S, T>* n, int f) {

0 commit comments

Comments
 (0)