copysign
C ++ copysign()函数 (C++ copysign() function)
copysign() function is a library function of cmath header, it is used to get the first argument's value with the sign of the second argument, it accepts two arguments (x, y) and returns magnitude of x with the sign of y.
copysign()函数是cmath标头的库函数,用于获取带有第二个参数的符号的第一个参数的值,它接受两个参数( x,y )并以y的符号返回x的大小。
Syntax of copysign() function:
copysign()函数的语法:
copysign(x, y);
Parameter(s): x, y – are the numbers to get the magnitude of