Return the value of a number with the sign of another:
System. |
The copySign() method retrieves the value of the first number but adopts the sign of the second number.
One of the following:
public |
public |
|
Parameter |
Description |
|
value |
Mandatory: A number that dictates the value. |
|
sign |
Necessary: A number that dictates the sign. |
|
Returns |
A double or float with the value of the first number and the sign of the second number. |
|
Java Version |
1.6+ |