Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function |neg

std/ops/num::|neg


Usage

|neg<N>(val)

Generics

◻ N: Neg

Parameters

↳ val: N

Return

N


Return negation of given value

This function is infaillible but may overflow if -val is out of bounds for the data type.