rackscrew.asmt now runs.
CMakeLists.txt gitignore rackscrew.asmt now runs. CMakeLists.txt remove cached assembly.asmt
This commit is contained in:
committed by
Brad Collette
parent
2bb83b82c0
commit
5907363be7
@@ -19,35 +19,13 @@ double MbD::Numeric::arcTan0to2piYoverX(double y, double x)
|
||||
//"(y/x) arcTan in the range 0 to 2*pi."
|
||||
//"Double arcTan0to2piY: 1.0d overX: 1.0d."
|
||||
|
||||
if (x > 0.0) {
|
||||
if (y >= 0) {
|
||||
//"First quadrant."
|
||||
return std::atan2(y, x);
|
||||
}
|
||||
else {
|
||||
//"Forth quadrant."
|
||||
return 2.0 * OS_M_PI + std::atan2(y, x);
|
||||
}
|
||||
if (y >= 0) {
|
||||
//"First and second quadrants."
|
||||
return std::atan2(y, x);
|
||||
}
|
||||
else {
|
||||
if (x < 0.0) {
|
||||
//"Second and Third quadrants."
|
||||
return OS_M_PI + std::atan2(y, x);
|
||||
}
|
||||
else {
|
||||
//"x = 0"
|
||||
if (y > 0.0) {
|
||||
return OS_M_PI / 2.0;
|
||||
}
|
||||
else {
|
||||
if (y < 0.0) {
|
||||
return 1.5 * OS_M_PI;
|
||||
}
|
||||
else {
|
||||
throw std::invalid_argument("atan2(0, 0) is not defined.");
|
||||
}
|
||||
}
|
||||
}
|
||||
//"Third and forth quadrants."
|
||||
return 2.0 * OS_M_PI + std::atan2(y, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user