mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Style [#METR-2944].
This commit is contained in:
parent
6bbac4b06c
commit
63834bf441
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user