# num_traits::sign::abs - Rust
API documentation for the Rust `abs` fn in crate `num_traits`.
Keywords: rust, rustlang, rust-lang, abs

# Function num_traits::sign::abs [−] [src]

    pub fn abs<T>(value: T) -> T where
        T: Signed,

Computes the absolute value.

For `f32` and `f64`, `NaN` will be returned if the number is `NaN`

For signed integers, `::MIN` will be returned if the number is `::MIN`.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)