48 if (angle >= 0 && angle < 90) {
49 angleRadians = angle *
PI_1 / 180.0;
52 }
else if (angle >= 90 && angle < 180) {
53 angleRadians = (angle - 90) *
PI_1 / 180.0;
56 }
else if (angle >= 180 && angle < 270) {
57 angleRadians = (angle - 180) *
PI_1 / 180.0;
61 angleRadians = (angle - 270) *
PI_1 / 180.0;
67 len = ::sqrt(dx * dx + dy * dy);
81 if (dx == 0 && dy == 0) {
97 if (theta >= 2 *
PI_1) {
100 theta = 2 *
PI_1 - theta;
101 if (theta == 2 *
PI_1) {
106 angle = theta * 180.0 /
PI_1;
114 return(::sqrt(dx * dx + dy * dy));
123 return (
int) (arg + 0.5f);
125 return (
int) (arg - 0.5f);
134 double angle_radians = angle *
PI_1 / 180.0;
150 double x = lower + ::rand() / (double) RAND_MAX * (upper - lower);
167 int x = lower + ::rand() % (upper - lower + 1);
185 double dx = (upper - lower) / 2.0f;
188 double c = -m * lower;
static float Atan(float x)
static float Sin(float val)
static float Cos(float val)
static void Angle_To_Vector(double angle, double &dx, double &dy)
static double Get_Normalized_Uniform_Pdf_Double()
static void Rotate_Vector(double &vx, double &vy, double angle)
static double Simple_Distance(double x1, double y1, double x2, double y2)
static double Get_Normalized_Hat_Pdf_Double()
static int Get_Uniform_Pdf_Int(int lower, int upper)
static int Round(double arg)
static int Get_Hat_Pdf_Int(int lower, int upper)
static double Get_Hat_Pdf_Double(double lower, double upper)
static void Vector_To_Angle(double dx, double dy, double &angle)
static double Get_Uniform_Pdf_Double(double lower, double upper)
const float MISCUTIL_EPSILON