Commit a1ec1041 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Adding cylinder volume calculation.

parent 02d95e03
......@@ -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
......@@ -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 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment