The D Programming Language's Unofficial Docs
beta
Dlang.org
Get Help
negs
core
checkedint
Negate an integer.
int
negs
(
int
x
,
ref
bool
overflow
)
nothrow @
safe
@
nogc
pure pragma(
inline
, true)
int
negs
()
(
int
x
,
ref
bool
overflow
)
long
negs
(
long
x
,
ref
bool
overflow
)
cent
negs
(
cent
x
,
ref
bool
overflow
)
Parameters
x
Type:
int
operand
overflow
Type:
bool
set if x cannot be negated, is not affected otherwise
Return Value
Type:
int
the negation of x
core
checkedint
functions
adds
addu
muls
mulu
negs
subs
subu
Suggestion Box / Bug Report
Negate an integer.