aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-Num.copysign.3
blob: 919772cd809bd4960b5ade3026ca26c0433dd076 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Num.copysign 3 2025-11-29 "Tomo man-pages"
.SH NAME
Num.copysign \- copy a number's sign
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Num.copysign\ :\ func(x:\ Num,\ y:\ Num\ ->\ Num)
.fi
.SH DESCRIPTION
Copies the sign of one number to another.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx
l l l.
Name	Type	Description
x	Num	The number whose magnitude will be copied. 
y	Num	The number whose sign will be copied. 
.TE
.SH RETURN
A number with the magnitude of `x` and the sign of `y`.

.SH EXAMPLES
.EX
assert (3.0).copysign(-1) == -3
.EE
.SH SEE ALSO
.BR Tomo-Num (3)