Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
a1ec1041
Commit
a1ec1041
authored
Jul 01, 2016
by
LEFEBVREJP email
Browse files
Adding cylinder volume calculation.
parent
02d95e03
Changes
2
Hide whitespace changes
Inline
Side-by-side
radixmath/util.cc
View file @
a1ec1041
...
...
@@ -146,4 +146,9 @@ Real greatCircleVolume(Real lat1, Real lon1, Real lat2, Real lon2, Real r1, Real
return
(
north
*
west
*
height
);
}
Real
cylinderVolume
(
Real
r
,
Real
h
)
{
return
(
PI
*
std
::
pow
(
r
,
2
)
*
h
);
}
}
// namespace radix
radixmath/util.hh
View file @
a1ec1041
...
...
@@ -49,6 +49,14 @@ Real greatCircleDistance(Real lat1, Real lon1, Real lat2, Real lon2, Real radius
*/
Real
greatCircleVolume
(
Real
lat1
,
Real
lon1
,
Real
lat2
,
Real
lon2
,
Real
r1
,
Real
r2
);
/**
* @brief cylinderVolume Calculates the volume of a cylinder
* @param r radius of cylinder
* @param h height of cylinder
* @return Real
*/
Real
cylinderVolume
(
Real
r
,
Real
h
);
std
::
vector
<
Real
>
getEqualAreaRadii
(
const
std
::
vector
<
Real
>&
radii
,
const
std
::
vector
<
unsigned
short
>&
subrings
);
inline
Real
toDegrees
(
Real
radians
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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