[#BloombergLP-bdldfp-DecimalUtil-copySign-065]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil.adoc[DecimalUtil]::copySign
:relfileprefix: ../../../
:mrdocs:

`copySign` overloads

== Synopses

Declared in `&lt;bdldfp&lowbar;decimalutil&period;h&gt;`

Same as the related overload above for `copySign`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128]
xref:BloombergLP/bdldfp/DecimalUtil/copySign-01.adoc[copySign](
    xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] x,
    xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] y);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/copySign-01.adoc[_» more&period;&period;&period;_]#

Return a value with the magnitude of `x` and the sign of `y`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32]
xref:BloombergLP/bdldfp/DecimalUtil/copySign-064.adoc[copySign](
    xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] x,
    xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] y);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/copySign-064.adoc[_» more&period;&period;&period;_]#

Same as the overload taking `Decimal32`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64]
xref:BloombergLP/bdldfp/DecimalUtil/copySign-09.adoc[copySign](
    xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64] x,
    xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64] y);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/copySign-09.adoc[_» more&period;&period;&period;_]#

== Return Value

value with the magnitude of `x` and the sign of `y`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *x*
| value providing the magnitude
| *y*
| value providing the sign
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
