public static double copySign (double magnitude, double sign)

Returns the first floating-point argument with the sign of the second floating-point argument. Note that unlike the StrictMath.copySign method, this method does not require NaN sign arguments to be treated as positive values; implementations are permitted to treat some NaN arguments as positive and other NaN arguments as negative to allow greater performance.

Parameters:
magnitude    the parameter providing the magnitude of the result
sign    the parameter providing the sign of the result

Returns:  a value with the magnitude of magnitude and the sign of sign.

Since:  1.6