Style [#METR-2944].

This commit is contained in:
Alexey Milovidov 2016-08-15 23:07:31 +03:00
parent 6bbac4b06c
commit 63834bf441

View File

@ -7,7 +7,8 @@
#define DEGREES_IN_RADIANS (M_PI / 180.0) #define DEGREES_IN_RADIANS (M_PI / 180.0)
namespace DB{ namespace DB
{
namespace ErrorCodes namespace ErrorCodes
{ {
@ -93,12 +94,12 @@ private:
} }
/// https://en.wikipedia.org/wiki/Great-circle_distance /// https://en.wikipedia.org/wiki/Great-circle_distance
Float64 greatCircleDistance(Float64 lon1Deg, Float64 lat1Deg, Float64 lon2Deg, Float64 lat2Deg) { Float64 greatCircleDistance(Float64 lon1Deg, Float64 lat1Deg, Float64 lon2Deg, Float64 lat2Deg)
{
if (lon1Deg < -180 || lon1Deg > 180 || if (lon1Deg < -180 || lon1Deg > 180 ||
lon2Deg < -180 || lon2Deg > 180 || lon2Deg < -180 || lon2Deg > 180 ||
lat1Deg < -90 || lat1Deg > 90 || lat1Deg < -90 || lat1Deg > 90 ||
lat2Deg < -90 || lat2Deg > 90 lat2Deg < -90 || lat2Deg > 90)
)
{ {
throw Exception("Arguments values out of bounds for function " + getName(), ErrorCodes::ARGUMENT_OUT_OF_BOUND); throw Exception("Arguments values out of bounds for function " + getName(), ErrorCodes::ARGUMENT_OUT_OF_BOUND);
} }