copysign

fnR copysign(R, X)(R to, X from) if (isFloatingPoint!(R) && isFloatingPoint!(X)) @trusted pure nothrow @nogc

Parameters

tothe numeric value to use
fromthe sign value to use

Returns

a value composed of to with from's sign bit.
fnR copysign(R, X)(X to, R from) if (isIntegral!(X) && isFloatingPoint!(R)) @trusted pure nothrow @nogc

ditto