26 #define PI 3.141592653589793 37 static bool angCheck(
float target_,
float min_,
float max_)
40 c = (target_ + 2 *
PI) / (2 *
PI);
41 float target = target_ + (1 - c) *
PI * 2;
42 c = (min_ + 2 *
PI) / (2 *
PI);
43 float min = min_ + (1 - c) *
PI * 2;
44 c = (max_ + 2 *
PI) / (2 *
PI);
45 float max = max_ + (1 - c) *
PI * 2;
49 if(target > min && target < max)
57 if(target > min && target < max)
62 if(target > min && target < max)
The main namespace for STDR Robot.
static bool angCheck(float target_, float min_, float max_)
Checks if an angle is between two others. Supposes that min < max.