Home » Java Math.copySign() Method with Examples

Java Math.copySign() Method with Examples

by Online Tutorials Library

Java Math.copySign() method

The java.lang.Math.copySign () is used to return the first argument with the sign of the second argument.

Syntax

Parameter

Return

Example 1

Test it Now

Output:

-740.4  

Example 2

Test it Now

Output:

580.73  

Example 3

Test it Now

Output:

-26.9  

Next TopicJava Math

You may also like