1 #include "../Shared/funcannotations.h"
6 #include <corecrt_math_defines.h>
42 double Acos(
const double x) {
47 double Asin(
const double x) {
52 double Atan(
const double x) {
62 double Atan2(
const double y,
const double x) {
92 double Cos(
const double x) {
97 double Cosh(
const double x) {
102 double Cot(
const double x) {
108 return x * (180.0 /
M_PI);
142 double ln(
const double x) {
152 double Log(
const double x) {
177 double power(
const double x,
const double y) {
183 return x * (
M_PI / 180.0);
187 double Round(
const double x,
const int32_t y) {
189 return round(x) + 0.0;
192 double exp = pow(10, y);
193 #if defined(__powerpc__) && !defined(__CUDACC__)
195 exp = 10 * powf((
float)10L, yy);
197 return (round(x * exp) / exp) + 0.0;
201 float Round__(
const float x,
const int32_t y) {
203 return roundf(x) + 0.0f;
206 float exp = powf((
float)10L, y);
207 #if defined(__powerpc__) && !defined(__CUDACC__)
209 exp = 10 * powf((
float)10L, yy);
211 return roundf(x * exp) / exp + 0.0f;
215 int16_t
Round__1(
const int16_t x,
const int32_t y) {
220 int32_t p = pow((
float)10L, std::abs(y));
221 int32_t p_half = p >> 1;
224 #if defined(__powerpc__) && !defined(__CUDACC__)
230 temp = temp >= 0 ? temp + p_half : temp - p_half;
236 int32_t
Round__2(
const int32_t x,
const int32_t y) {
241 int32_t p = pow((
float)10L, std::abs(y));
242 int32_t p_half = p >> 1;
245 #if defined(__powerpc__) && !defined(__CUDACC__)
251 temp = temp >= 0 ? temp + p_half : temp - p_half;
257 int64_t
Round__3(
const int64_t x,
const int32_t y) {
262 int64_t p = pow((
double)10L, std::abs(y));
263 int64_t p_half = p >> 1;
266 temp = temp >= 0 ? temp + p_half : temp - p_half;
272 int64_t
Round__4(
const int64_t x,
const int32_t y0,
const int32_t scale) {
273 int32_t y = y0 - scale;
279 int64_t p = pow((
double)10L, std::abs(y));
280 int64_t p_half = p >> 1;
283 temp = temp >= 0 ? temp + p_half : temp - p_half;
290 double exp = pow(10, y);
291 return round(x * exp) / exp;
296 double exp = pow(10, y);
297 return round(x * exp) / exp;
301 double Sin(
const double x) {
316 double Tan(
const double x) {
332 double p = pow((
double)10L, y);
333 int64_t temp = x * p;
339 float p = powf((
float)10L, y);
340 int64_t temp = x * p;
349 int32_t p = pow((
float)10L, std::abs(y));
350 int64_t temp = x / p;
351 #if defined(__powerpc__) && !defined(__CUDACC__)
366 int32_t p = pow((
float)10L, std::abs(y));
367 int64_t temp = x / p;
376 int64_t p = pow((
double)10L, std::abs(y));
377 int64_t temp = x / p;
383 return std::isnan(x);
388 return std::isnan(x);
393 return x * 111319.490778;
398 return 6378136.99911 * log(tan(.00872664626 * y + .785398163397));
424 const double fromlat,
426 const double tolat) {
427 double latitudeArc = (fromlat - tolat) * 0.017453292519943295769236907684886;
428 double longitudeArc = (fromlon - tolon) * 0.017453292519943295769236907684886;
429 double latitudeH = sin(latitudeArc * 0.5);
430 latitudeH *= latitudeH;
431 double lontitudeH = sin(longitudeArc * 0.5);
432 lontitudeH *= lontitudeH;
433 double tmp = cos(fromlat * 0.017453292519943295769236907684886) *
434 cos(tolat * 0.017453292519943295769236907684886);
435 return 6372797.560856 * (2.0 * asin(sqrt(latitudeH + tmp * lontitudeH)));
443 float latitudeArc = (fromlat - tolat) * 0.017453292519943295769236907684886;
444 float longitudeArc = (fromlon - tolon) * 0.017453292519943295769236907684886;
445 float latitudeH = sinf(latitudeArc * 0.5);
446 latitudeH *= latitudeH;
447 float lontitudeH = sinf(longitudeArc * 0.5);
448 lontitudeH *= lontitudeH;
449 float tmp = cosf(fromlat * 0.017453292519943295769236907684886) *
450 cosf(tolat * 0.017453292519943295769236907684886);
451 return 6372797.560856 * (2.0 * asinf(sqrtf(latitudeH + tmp * lontitudeH)));
460 float latitudeArc = (fromlat - tolat) * 0.017453292519943295769236907684886;
461 float longitudeArc = (fromlon - tolon) * 0.017453292519943295769236907684886;
462 float latitudeH = __sinf(latitudeArc * 0.5);
463 latitudeH *= latitudeH;
464 float lontitudeH = __sinf(longitudeArc * 0.5);
465 lontitudeH *= lontitudeH;
466 float tmp = __cosf(fromlat * 0.017453292519943295769236907684886) *
467 __cosf(tolat * 0.017453292519943295769236907684886);
468 return 6372797.560856 * (2.0 * asinf(__fsqrt_rd(latitudeH + tmp * lontitudeH)));
478 const int32_t numbins,
479 const int32_t dimensionsize) {
481 float numbinsf = float(numbins);
482 return float(int32_t(
float((val - min) / (max - min)) * numbinsf)) *
483 float(dimensionsize) / numbinsf;
490 const double rectwidth,
491 const double offsetx,
492 const int32_t imgwidth) {
493 const float imgwidthf = float(imgwidth);
494 const float rectwidthf = float(rectwidth);
496 float offset = offsetx;
498 offset = fmodf(offset, rectwidthf);
500 offset -= rectwidthf;
502 min += offset * (maxx - minx) / imgwidthf;
504 return float(int32_t(
float((valx - min) / (maxx - min)) * (imgwidthf - offset) /
507 offset + rectwidthf / 2.0f;
514 const double rectheight,
515 const double offsety,
516 const int32_t imgheight) {
517 const float imgheightf = float(imgheight);
518 const float rectheightf = rectheight;
520 float offset = offsety;
522 offset = fmodf(offset, rectheightf);
524 offset -= rectheightf;
526 min += offset * (maxy - miny) / imgheightf;
528 return float(int32_t(
float((valy - min) / (maxy - min)) * (imgheightf - offset) /
531 offset + rectheightf / 2.0f;
541 const double rectwidth,
542 const double rectheight,
543 const double offsetx,
544 const double offsety,
545 const int32_t imgwidth,
546 const int32_t imgheight) {
547 const float imgwidthf = float(imgwidth);
548 const float rectwidthf = float(rectwidth);
550 float offset = offsetx;
552 offset = fmodf(offset, rectwidthf);
554 offset -= rectwidthf;
556 min += offset * (maxx - minx) / imgwidthf;
558 float rx = float(int32_t(
float((valx - min) / (maxx - min)) * (imgwidthf - offset) /
561 offset + rectwidthf / 2.0f;
563 const float imgheightf = float(imgheight);
564 const float rectheightf = rectheight;
568 offset = fmodf(offset, rectheightf);
570 offset -= rectheightf;
572 min += offset * (maxy - miny) / imgheightf;
574 float ry = float(int32_t(
float((valy - min) / (maxy - min)) * (imgheightf - offset) /
577 offset + rectheightf / 2.0f;
580 int32_t ux =
static_cast<int32_t
>(rx * 4.0f);
581 int32_t uy =
static_cast<int32_t
>(ry * 4.0f);
582 return (ux & 0x7FFF) | ((uy & 0x7FFF) << 16);
592 const double hexwidth,
593 const double hexheight,
594 const double offsetx,
595 const double offsety,
596 const int32_t imgwidth,
597 const int32_t imgheight) {
598 const float sqrt3 = 1.7320508075688772;
599 const float imgwidthf = float(imgwidth);
600 const float imgheightf = float(imgheight);
601 const float hexwidthf = float(hexwidth);
602 const float hexheightf = float(hexheight);
610 float xoffset = offsetx;
612 xoffset = fmodf(xoffset, hexwidthf);
614 xoffset -= hexwidthf;
616 xmin += xoffset * (maxx - xmin) / imgwidthf;
620 float yoffset = offsety;
622 yoffset = fmodf(yoffset, 1.5
f * hexheightf);
624 yoffset -= 1.5f * hexheightf;
626 ymin += yoffset * (maxy - ymin) / imgheightf;
633 roundf((imgwidthf - xoffset) *
float((valx - xmin) / (maxx - xmin)));
635 roundf((imgheightf - yoffset) *
float((valy - ymin) / (maxy - ymin)));
639 const float hexsize = hexheightf / 2.0f;
640 const float cube_x = ((pix_x / sqrt3) - (pix_y / 3.0
f)) / hexsize;
641 const float cube_z = (pix_y * 2.0f / 3.0f) / hexsize;
642 const float cube_y = -cube_x - cube_z;
645 float rx = round(cube_x);
646 float ry = round(cube_y);
647 float rz = round(cube_z);
648 const float x_diff = fabs(rx - cube_x);
649 const float y_diff = fabs(ry - cube_y);
650 const float z_diff = fabs(rz - cube_z);
651 if (x_diff > y_diff && x_diff > z_diff) {
653 }
else if (y_diff > z_diff) {
660 return hexsize * sqrt3 * (rx + rz / 2.0f) + xoffset;
670 const double hexwidth,
671 const double hexheight,
672 const double offsetx,
673 const double offsety,
674 const int32_t imgwidth,
675 const int32_t imgheight) {
676 const float sqrt3 = 1.7320508075688772;
677 const float imgwidthf = float(imgwidth);
678 const float imgheightf = float(imgheight);
679 const float hexwidthf = float(hexwidth);
680 const float hexheightf = float(hexheight);
688 float xoffset = offsetx;
690 xoffset = fmodf(xoffset, hexwidthf);
692 xoffset -= hexwidthf;
694 xmin += xoffset * (maxx - xmin) / imgwidthf;
698 float yoffset = offsety;
700 yoffset = fmodf(yoffset, 1.5
f * hexheightf);
702 yoffset -= 1.5f * hexheightf;
704 ymin += yoffset * (maxy - ymin) / imgheightf;
711 roundf((imgwidthf - xoffset) *
float((valx - xmin) / (maxx - xmin)));
713 roundf((imgheightf - yoffset) *
float((valy - ymin) / (maxy - ymin)));
717 const float hexsize = hexheightf / 2.0f;
718 const float cube_x = ((pix_x / sqrt3) - (pix_y / 3.0
f)) / hexsize;
719 const float cube_z = (pix_y * 2.0f / 3.0f) / hexsize;
720 const float cube_y = -cube_x - cube_z;
723 float rx = round(cube_x);
724 float ry = round(cube_y);
725 float rz = round(cube_z);
726 const float x_diff = fabs(rx - cube_x);
727 const float y_diff = fabs(ry - cube_y);
728 const float z_diff = fabs(rz - cube_z);
729 if ((x_diff <= y_diff || x_diff <= z_diff) && y_diff <= z_diff) {
734 return hexsize * 3.0f / 2.0f * rz + yoffset;
744 const double hexwidth,
745 const double hexheight,
746 const double offsetx,
747 const double offsety,
748 const int32_t imgwidth,
749 const int32_t imgheight) {
750 const float sqrt3 = 1.7320508075688772;
751 const float imgwidthf = float(imgwidth);
752 const float imgheightf = float(imgheight);
753 const float hexwidthf = float(hexwidth);
754 const float hexheightf = float(hexheight);
762 float xoffset = offsetx;
764 xoffset = fmodf(xoffset, hexwidthf);
766 xoffset -= hexwidthf;
768 xmin += xoffset * (maxx - xmin) / imgwidthf;
772 float yoffset = offsety;
774 yoffset = fmodf(yoffset, 1.5
f * hexheightf);
776 yoffset -= 1.5f * hexheightf;
778 ymin += yoffset * (maxy - ymin) / imgheightf;
785 roundf((imgwidthf - xoffset) *
float((valx - xmin) / (maxx - xmin)));
787 roundf((imgheightf - yoffset) *
float((valy - ymin) / (maxy - ymin)));
791 const float hexsize = hexheightf / 2.0f;
792 const float cube_x = ((pix_x / sqrt3) - (pix_y / 3.0
f)) / hexsize;
793 const float cube_z = (pix_y * 2.0f / 3.0f) / hexsize;
794 const float cube_y = -cube_x - cube_z;
797 float rx = round(cube_x);
798 float ry = round(cube_y);
799 float rz = round(cube_z);
800 const float x_diff = fabs(rx - cube_x);
801 const float y_diff = fabs(ry - cube_y);
802 const float z_diff = fabs(rz - cube_z);
803 if (x_diff > y_diff && x_diff > z_diff) {
805 }
else if (y_diff <= z_diff) {
810 float hx = hexsize * sqrt3 * (rx + rz / 2.0f) + xoffset;
811 float hy = hexsize * 3.0f / 2.0f * rz + yoffset;
814 int32_t ux =
static_cast<int32_t
>(hx * 4.0f);
815 int32_t uy =
static_cast<int32_t
>(hy * 4.0f);
816 return (ux & 0x7FFF) | ((uy & 0x7FFF) << 16);
826 const double hexwidth,
827 const double hexheight,
828 const double offsetx,
829 const double offsety,
830 const int32_t imgwidth,
831 const int32_t imgheight) {
832 const float sqrt3 = 1.7320508075688772;
833 const float imgwidthf = float(imgwidth);
834 const float imgheightf = float(imgheight);
835 const float hexwidthf = float(hexwidth);
836 const float hexheightf = float(hexheight);
844 float xoffset = offsetx;
846 xoffset = fmodf(xoffset, 1.5
f * hexwidthf);
848 xoffset -= 1.5f * hexwidthf;
850 xmin += xoffset * (maxx - xmin) / imgwidthf;
854 float yoffset = offsety;
856 yoffset = fmodf(yoffset, hexheightf);
858 yoffset -= hexheightf;
860 ymin += yoffset * (maxy - ymin) / imgheightf;
867 roundf((imgwidthf - xoffset) *
float((valx - xmin) / (maxx - xmin)));
869 roundf((imgheightf - yoffset) *
float((valy - ymin) / (maxy - ymin)));
873 const float hexsize = hexwidthf / 2.0f;
874 const float cube_x = (pix_x * 2.0f / 3.0f) / hexsize;
875 const float cube_z = ((pix_y / sqrt3) - (pix_x / 3.0
f)) / hexsize;
876 const float cube_y = -cube_x - cube_z;
879 float rx = round(cube_x);
880 float ry = round(cube_y);
881 float rz = round(cube_z);
882 const float x_diff = fabs(rx - cube_x);
883 const float y_diff = fabs(ry - cube_y);
884 const float z_diff = fabs(rz - cube_z);
885 if (x_diff > y_diff && x_diff > z_diff) {
890 return hexsize * 3.0f / 2.0f * rx + xoffset;
900 const double hexwidth,
901 const double hexheight,
902 const double offsetx,
903 const double offsety,
904 const int32_t imgwidth,
905 const int32_t imgheight) {
906 const float sqrt3 = 1.7320508075688772;
907 const float imgwidthf = float(imgwidth);
908 const float imgheightf = float(imgheight);
909 const float hexwidthf = float(hexwidth);
910 const float hexheightf = float(hexheight);
918 float xoffset = offsetx;
920 xoffset = fmodf(xoffset, 1.5
f * hexwidthf);
922 xoffset -= 1.5f * hexwidthf;
924 xmin += xoffset * (maxx - xmin) / imgwidthf;
928 float yoffset = offsety;
930 yoffset = fmodf(yoffset, hexheightf);
932 yoffset -= hexheightf;
934 ymin += yoffset * (maxy - ymin) / imgheightf;
940 const float pix_x = roundf((imgwidthf - xoffset) * (valx - xmin) / (maxx - xmin));
941 const float pix_y = roundf((imgheightf - yoffset) * (valy - ymin) / (maxy - ymin));
945 const float hexsize = hexwidthf / 2.0f;
946 const float cube_x = (pix_x * 2.0f / 3.0f) / hexsize;
947 const float cube_z = ((pix_y / sqrt3) - (pix_x / 3.0
f)) / hexsize;
948 const float cube_y = -cube_x - cube_z;
951 float rx = round(cube_x);
952 float ry = round(cube_y);
953 float rz = round(cube_z);
954 const float x_diff = fabs(rx - cube_x);
955 const float y_diff = fabs(ry - cube_y);
956 const float z_diff = fabs(rz - cube_z);
957 if (x_diff > y_diff && x_diff > z_diff) {
959 }
else if (y_diff > z_diff) {
966 return hexsize * sqrt3 * (rz + rx / 2.0f) + yoffset;
976 const double hexwidth,
977 const double hexheight,
978 const double offsetx,
979 const double offsety,
980 const int32_t imgwidth,
981 const int32_t imgheight) {
982 const float sqrt3 = 1.7320508075688772;
983 const float imgwidthf = float(imgwidth);
984 const float imgheightf = float(imgheight);
985 const float hexwidthf = float(hexwidth);
986 const float hexheightf = float(hexheight);
994 float xoffset = offsetx;
996 xoffset = fmodf(xoffset, 1.5
f * hexwidthf);
998 xoffset -= 1.5f * hexwidthf;
1000 xmin += xoffset * (maxx - xmin) / imgwidthf;
1004 float yoffset = offsety;
1006 yoffset = fmodf(yoffset, hexheightf);
1008 yoffset -= hexheightf;
1010 ymin += yoffset * (maxy - ymin) / imgheightf;
1016 const float pix_x = roundf((imgwidthf - xoffset) *
float(valx - xmin) / (maxx - xmin));
1017 const float pix_y = roundf((imgheightf - yoffset) *
float(valy - ymin) / (maxy - ymin));
1021 const float hexsize = hexwidthf / 2.0f;
1022 const float cube_x = (pix_x * 2.0f / 3.0f) / hexsize;
1023 const float cube_z = ((pix_y / sqrt3) - (pix_x / 3.0
f)) / hexsize;
1024 const float cube_y = -cube_x - cube_z;
1027 float rx = round(cube_x);
1028 float ry = round(cube_y);
1029 float rz = round(cube_z);
1030 const float x_diff = fabs(rx - cube_x);
1031 const float y_diff = fabs(ry - cube_y);
1032 const float z_diff = fabs(rz - cube_z);
1033 if (x_diff > y_diff && x_diff > z_diff) {
1035 }
else if (y_diff <= z_diff) {
1040 float hx = hexsize * 3.0f / 2.0f * rx + xoffset;
1041 float hy = hexsize * sqrt3 * (rz + rx / 2.0f) + yoffset;
1044 int32_t ux =
static_cast<int32_t
>(hx * 4.0f);
1045 int32_t uy =
static_cast<int32_t
>(hy * 4.0f);
1046 return (ux & 0x7FFF) | ((uy & 0x7FFF) << 16);
1053 const double min_lon,
1054 const double max_lon,
1055 const int32_t img_width,
1056 const double min_width) {
1057 const double const1 = 0.017453292519943295769236907684886;
1058 const double const2 = 6372797.560856;
1059 double t1 = sinf(meters / (2.0 * const2));
1060 double t2 = cosf(const1 * lat);
1061 const double newlon = lon - (2.0 * asinf(t1 / t2)) / const1;
1066 const double merc_diff = max_merc_x - min_merc_x;
1067 t1 = ((t1 - min_merc_x) / merc_diff) *
static_cast<double>(img_width);
1068 t2 = ((t2 - min_merc_x) / merc_diff) *
static_cast<double>(img_width);
1071 const double sz = fabs(t1 - t2);
1072 return (sz < min_width ? min_width : sz);
1079 const double min_lat,
1080 const double max_lat,
1081 const int32_t img_height,
1082 const double min_height) {
1083 const double const1 = 0.017453292519943295769236907684886;
1084 const double const2 = 6372797.560856;
1085 const double latdiff = meters / (const1 * const2);
1086 const double newlat =
1087 (lat < 0) ? lat + latdiff : lat - latdiff;
1092 const double merc_diff = max_merc_y - min_merc_y;
1093 t1 = ((t1 - min_merc_y) / merc_diff) *
static_cast<double>(img_height);
1094 t2 = ((t2 - min_merc_y) / merc_diff) *
static_cast<double>(img_height);
1097 const double sz = fabs(t1 - t2);
1098 return (sz < min_height ? min_height : sz);
1103 const double min_lon,
1104 const double max_lon,
1105 const double min_lat,
1106 const double max_lat) {
1107 return !(lon < min_lon || lon > max_lon || lat < min_lat || lat > max_lat);
1112 const double meters,
1113 const double min_lon,
1114 const double max_lon,
1115 const double min_lat,
1116 const double max_lat) {
1117 const double const1 = 0.017453292519943295769236907684886;
1118 const double const2 = 6372797.560856;
1119 const double latdiff = meters / (const1 * const2);
1120 const double t1 = sinf(meters / (2.0 * const2));
1121 const double t2 = cosf(const1 * lat);
1122 const double londiff = (2.0 * asinf(t1 / t2)) / const1;
1123 return !(lon + londiff < min_lon || lon - londiff > max_lon ||
1124 lat + latdiff < min_lat || lat - latdiff > max_lat);
EXTENSION_NOINLINE double Atanh(const double x)
EXTENSION_NOINLINE double ln(const double x)
EXTENSION_NOINLINE int32_t reg_hex_horiz_pixel_bin_packed(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE float reg_hex_horiz_pixel_bin_x(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE double Tan__(const float x)
EXTENSION_INLINE bool is_point_in_merc_view(const double lon, const double lat, const double min_lon, const double max_lon, const double min_lat, const double max_lat)
#define EXTENSION_NOINLINE
EXTENSION_NOINLINE double Sin(const double x)
EXTENSION_NOINLINE int32_t Truncate__2(const int32_t x, const int32_t y)
EXTENSION_NOINLINE double power(const double x, const double y)
EXTENSION_NOINLINE double Cot(const double x)
EXTENSION_NOINLINE int32_t rect_pixel_bin_packed(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double rectwidth, const double rectheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE int64_t Round__3(const int64_t x, const int32_t y)
EXTENSION_NOINLINE double distance_in_meters__(const float fromlon, const float fromlat, const float tolon, const float tolat)
EXTENSION_NOINLINE int16_t Round__1(const int16_t x, const int32_t y)
EXTENSION_NOINLINE double Asin(const double x)
EXTENSION_NOINLINE double Log10(const double x)
EXTENSION_NOINLINE double convert_meters_to_merc_pixel_width(const double meters, const double lon, const double lat, const double min_lon, const double max_lon, const int32_t img_width, const double min_width)
EXTENSION_NOINLINE float Floor__(float x)
EXTENSION_NOINLINE int64_t Floor__3(int64_t x)
EXTENSION_NOINLINE double Ceil(double x)
EXTENSION_NOINLINE double Sqrt(const double x)
EXTENSION_NOINLINE int16_t Ceil__1(int16_t x)
EXTENSION_NOINLINE int64_t Truncate__3(const int64_t x, const int32_t y)
EXTENSION_NOINLINE int16_t Floor__1(int16_t x)
EXTENSION_NOINLINE double Exp(double x)
EXTENSION_NOINLINE bool isNan__(const float x)
EXTENSION_NOINLINE double radians(const double x)
EXTENSION_NOINLINE double Cos(const double x)
EXTENSION_NOINLINE int64_t Round__4(const int64_t x, const int32_t y0, const int32_t scale)
EXTENSION_NOINLINE int32_t Ceil__2(int32_t x)
EXTENSION_NOINLINE float rect_pixel_bin_y(const double valy, const double miny, const double maxy, const double rectheight, const double offsety, const int32_t imgheight)
EXTENSION_NOINLINE int32_t Round__2(const int32_t x, const int32_t y)
EXTENSION_NOINLINE bool isNan(const double x)
EXTENSION_NOINLINE double Cosh(const double x)
EXTENSION_NOINLINE double Floor(double x)
EXTENSION_NOINLINE double Round2_to_digit(const double x, const int32_t y)
EXTENSION_NOINLINE double degrees(double x)
EXTENSION_NOINLINE double round_to_digit(const double x, const int32_t y)
EXTENSION_NOINLINE double convert_meters_to_merc_pixel_height(const double meters, const double lon, const double lat, const double min_lat, const double max_lat, const int32_t img_height, const double min_height)
EXTENSION_NOINLINE double Log__(const float x)
EXTENSION_NOINLINE float reg_hex_horiz_pixel_bin_y(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE double ln__(const float x)
EXTENSION_NOINLINE float rect_pixel_bin(const double val, const double min, const double max, const int32_t numbins, const int32_t dimensionsize)
EXTENSION_NOINLINE float reg_hex_vert_pixel_bin_x(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE int64_t Ceil__3(int64_t x)
EXTENSION_NOINLINE float Round__(const float x, const int32_t y)
EXTENSION_NOINLINE float Truncate__(const float x, const int32_t y)
EXTENSION_NOINLINE double distance_in_meters(const double fromlon, const double fromlat, const double tolon, const double tolat)
Computes the distance, in meters, between two WGS-84 positions.
EXTENSION_NOINLINE double Round(const double x, const int32_t y)
EXTENSION_NOINLINE float Ceil__(float x)
EXTENSION_NOINLINE float reg_hex_vert_pixel_bin_y(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE int32_t Floor__2(int32_t x)
EXTENSION_NOINLINE double Truncate(const double x, const int32_t y)
EXTENSION_NOINLINE double Log(const double x)
EXTENSION_NOINLINE double approx_distance_in_meters(const float fromlon, const float fromlat, const float tolon, const float tolat)
EXTENSION_NOINLINE double Sinh(const double x)
EXTENSION_NOINLINE double Tanh(const double x)
EXTENSION_NOINLINE float rect_pixel_bin_x(const double valx, const double minx, const double maxx, const double rectwidth, const double offsetx, const int32_t imgwidth)
EXTENSION_NOINLINE double pi()
EXTENSION_NOINLINE int32_t reg_hex_vert_pixel_bin_packed(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE double Tan(const double x)
EXTENSION_NOINLINE double Atan2(const double y, const double x)
EXTENSION_NOINLINE double conv_4326_900913_y(const double y)
EXTENSION_NOINLINE double Atan(const double x)
EXTENSION_NOINLINE double conv_4326_900913_x(const double x)
EXTENSION_NOINLINE double Log10__(const float x)
EXTENSION_NOINLINE bool is_point_size_in_merc_view(const double lon, const double lat, const double meters, const double min_lon, const double max_lon, const double min_lat, const double max_lat)
EXTENSION_NOINLINE int16_t Truncate__1(const int16_t x, const int32_t y)
EXTENSION_NOINLINE double Acos(const double x)