Toggle navigation
Toggle navigation
This project
Loading...
Sign in
尹诚
/
Mapbox-iOS-SDK
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Thomas Rasch
13 years ago
Commit
5730c333f0a7ce96db638448e6ea0aeaaa89c2e0
1 parent
ec8f1fbc
o Added RMEuclideanDistanceBetweenProjectedPoints
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
MapView/Map/RMFoundation.c
MapView/Map/RMFoundation.h
MapView/Map/RMFoundation.c
View file @
5730c33
...
...
@@ -26,6 +26,7 @@
// POSSIBILITY OF SUCH DAMAGE.
#import "RMFoundation.h"
#import <math.h>
bool
RMProjectedPointEqualToProjectedPoint
(
RMProjectedPoint
point1
,
RMProjectedPoint
point2
)
{
...
...
@@ -125,3 +126,11 @@ RMProjectedRect RMProjectedRectZero()
{
return
RMProjectedRectMake
(
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
);
}
double
RMEuclideanDistanceBetweenProjectedPoints
(
RMProjectedPoint
point1
,
RMProjectedPoint
point2
)
{
double
xd
=
point2
.
x
-
point1
.
x
;
double
yd
=
point2
.
y
-
point1
.
y
;
return
sqrt
(
xd
*
xd
+
yd
*
yd
);
}
...
...
MapView/Map/RMFoundation.h
View file @
5730c33
...
...
@@ -80,4 +80,6 @@ RMProjectedSize RMProjectedSizeMake(double width, double heigth);
RMProjectedRect
RMProjectedRectZero
();
double
RMEuclideanDistanceBetweenProjectedPoints
(
RMProjectedPoint
point1
,
RMProjectedPoint
point2
);
#endif
...
...
Please
register
or
login
to post a comment