34 #include <flexiport/port.h>
40 typedef unsigned char uint8_t;
41 typedef unsigned int uint32_t;
42 #if defined(HOKUYOAIST_STATIC)
43 #define HOKUYOAIST_EXPORT
44 #elif defined(hokuyoaist_EXPORTS)
45 #define HOKUYOAIST_EXPORT __declspec(dllexport)
47 #define HOKUYOAIST_EXPORT __declspec(dllimport)
51 #define HOKUYOAIST_EXPORT
62 double const M_PI = 3.14159265358979323846;
66 inline double RTOD(
double rad)
68 return rad * 180.0 /
M_PI;
73 inline double DTOR(
double deg)
75 return deg *
M_PI / 180.0;
84 typename std::vector<T>::iterator first(v.begin());
85 typename std::vector<T>::iterator
median(first + (v.end() - first) / 2);
86 std::nth_element(first, median, v.end());