Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
bbd287fb
Commit
bbd287fb
authored
Mar 28, 2016
by
Uwe Schulzweida
Browse files
clipping/geometry.h::get_angle: replace round() by lround()
parent
336d944f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/clipping/geometry.h
View file @
bbd287fb
...
...
@@ -44,6 +44,10 @@
#ifndef GEOMETRY_H
#define GEOMETRY_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "grid.h"
#include "utils.h"
...
...
@@ -140,7 +144,11 @@ int yac_point_in_cell2 (struct point point, double point_coords[3],
*/
static
inline
double
get_angle
(
double
a_lon
,
double
b_lon
)
{
double
diff
=
a_lon
-
b_lon
;
#if defined(CDO)
return
diff
-
lround
(
diff
/
(
2
.
0
*
M_PI
))
*
(
2
.
0
*
M_PI
);
#else
return
diff
-
round
(
diff
/
(
2
.
0
*
M_PI
))
*
(
2
.
0
*
M_PI
);
#endif
}
/** \example test_find_overlap.c
...
...
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