uabs

Crates.iouabs
lib.rsuabs
version3.0.0
sourcesrc
created_at2018-10-10 18:47:37.983032
updated_at2020-09-07 20:43:19.653042
descriptionAbsolute value function that returns an unsigned integer
homepage
repositoryhttps://github.com/enarx/uabs
max_upload_size
id89116
size18,143
Nathaniel McCallum (npmccallum)

documentation

https://docs.rs/uabs

README

Workflow Status Average time to resolve an issue Percentage of issues still open Maintenance

uabs

This crate provides the UnsignedAbs trait containing a function uabs() which calculates the absolute value of the input and returns it as an unsigned integer of the same size as the input. For example:

use uabs::Uabs;

let x: i8 = -128;
let y: u8 = x.uabs();
assert_eq!(y, 128);

License: Apache-2.0

Commit count: 20

cargo fmt