public static double copySign (double magnitude, double sign)

Returns the first floating-point argument with the sign of the
second floating-point argument. For this method, a NaN
` sign`

argument is always treated as if it were
positive.

`magnitude` | the parameter providing the magnitude of the result | |

`sign` | the parameter providing the sign of the result |

` magnitude`

and the sign of ` sign`

.

Diagram: Math