number from which to derive a magnitude
number from which to derive a sign
a single-precision floating-point number
var z = copysignf( -3.0, 10.0 );
// returns 3.0
var z = copysignf( 3.0, -1.0 );
// returns -3.0
var z = copysignf( 1.0, -0.0 );
// returns -1.0
var z = copysignf( -3.0, -0.0 );
// returns -3.0
var z = copysignf( -0.0, 1.0 );
// returns 0.0
Returns a single-precision floating-point number with the magnitude of
x
and the sign ofy
.