Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4e9c3027
Commit
4e9c3027
authored
Feb 18, 2016
by
Itamar Haber
Browse files
Adjusts accuracy for GEODIST
parent
cf42c48a
Changes
1
Show whitespace changes
Inline
Side-by-side
src/geo.c
View file @
4e9c3027
...
@@ -767,6 +767,6 @@ void geodistCommand(client *c) {
...
@@ -767,6 +767,6 @@ void geodistCommand(client *c) {
if
(
!
decodeGeohash
(
score1
,
xyxy
)
||
!
decodeGeohash
(
score2
,
xyxy
+
2
))
if
(
!
decodeGeohash
(
score1
,
xyxy
)
||
!
decodeGeohash
(
score2
,
xyxy
+
2
))
addReply
(
c
,
shared
.
nullbulk
);
addReply
(
c
,
shared
.
nullbulk
);
else
else
addReplyDouble
(
c
,
addReplyDouble
Distance
(
c
,
geohashGetDistance
(
xyxy
[
0
],
xyxy
[
1
],
xyxy
[
2
],
xyxy
[
3
])
/
to_meter
);
geohashGetDistance
(
xyxy
[
0
],
xyxy
[
1
],
xyxy
[
2
],
xyxy
[
3
])
/
to_meter
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment