26 namespace ObjexxFCL { }
using namespace ObjexxFCL;
73 double st = std::sqrt( bsq - ac4 );
167 double const halfx = 0.5f *
x;
168 return ( ( a >= halfx || a < -halfx ) ?
mod(
mod( a, x ) + ( x + halfx ), x ) - halfx : a );
194 return ( ( a >= x || a < 0.0 ) ?
mod(
mod( a, x ) + x, x ) : a );
201 int const odd = (
int)std::fabs(
double(
mod( static_cast< int >( ang /
double(180.0) ), 2 ) ) );
202 ang =
mod( ang,
double(180.0) );
203 if ( odd == 0 )
return;
205 ang -= double(180.0);
208 ang += double(180.0);
209 assert( ang <=
double(180.0) && ang >
double(-180.0));
double periodic_range(double a, double x)
a is restricted to [-x/2,x/2), assuming that a=a+n*x, n=any integer
double unsigned_periodic_range(double a, double x)
a is restricted to [0.,x), assuming that a=a+n*x,, n=any integer
double subtract_radian_angles(double a, double b)
subtract angles in radians, restricting the range of the result
double subtract_degree_angles(double a, double b)
subtract angles in degrees, restricting the range of the result
T mod(T const &x, T const &y)
x(mod y) computational modulo returning magnitude < | y | and sign of x
void calc_quadratic(double a, double b, double c, double &n1, double &n2)
calculates quadratic polynomial solutions
void angle_in_range(double &ang)
taken from wobble.cc
Common numeric constants in varying precisions.