Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
208c3553
Commit
208c3553
authored
6 years ago
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put back the great_circle files in the examples/not_in_docs
parent
f35173fb
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
docs/examples/not_in_docs/great_circle/c1.pyx
docs/examples/not_in_docs/great_circle/c1.pyx
+12
-0
docs/examples/not_in_docs/great_circle/c2.pyx
docs/examples/not_in_docs/great_circle/c2.pyx
+13
-0
docs/examples/not_in_docs/great_circle/p1.py
docs/examples/not_in_docs/great_circle/p1.py
+12
-0
No files found.
docs/examples/not_in_docs/great_circle/c1.pyx
0 → 100644
View file @
208c3553
import
math
def
great_circle
(
lon1
,
lat1
,
lon2
,
lat2
):
radius
=
3956
# miles
x
=
math
.
pi
/
180.0
a
=
(
90.0
-
lat1
)
*
x
b
=
(
90.0
-
lat2
)
*
x
theta
=
(
lon2
-
lon1
)
*
x
c
=
math
.
acos
(
math
.
cos
(
a
)
*
math
.
cos
(
b
)
+
math
.
sin
(
a
)
*
math
.
sin
(
b
)
*
math
.
cos
(
theta
))
return
radius
*
c
This diff is collapsed.
Click to expand it.
docs/examples/not_in_docs/great_circle/c2.pyx
0 → 100644
View file @
208c3553
import
math
def
great_circle
(
double
lon1
,
double
lat1
,
double
lon2
,
double
lat2
):
cdef
double
radius
=
3956
# miles
cdef
double
x
=
math
.
pi
/
180.0
cdef
double
a
,
b
,
theta
,
c
a
=
(
90.0
-
lat1
)
*
x
b
=
(
90.0
-
lat2
)
*
x
theta
=
(
lon2
-
lon1
)
*
x
c
=
math
.
acos
(
math
.
cos
(
a
)
*
math
.
cos
(
b
)
+
math
.
sin
(
a
)
*
math
.
sin
(
b
)
*
math
.
cos
(
theta
))
return
radius
*
c
This diff is collapsed.
Click to expand it.
docs/examples/not_in_docs/great_circle/p1.py
0 → 100644
View file @
208c3553
import
math
def
great_circle
(
lon1
,
lat1
,
lon2
,
lat2
):
radius
=
3956
# miles
x
=
math
.
pi
/
180.0
a
=
(
90.0
-
lat1
)
*
x
b
=
(
90.0
-
lat2
)
*
x
theta
=
(
lon2
-
lon1
)
*
x
c
=
math
.
acos
(
math
.
cos
(
a
)
*
math
.
cos
(
b
)
+
math
.
sin
(
a
)
*
math
.
sin
(
b
)
*
math
.
cos
(
theta
))
return
radius
*
c
This diff is collapsed.
Click to expand it.
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