Skip to main content

subtract

Function subtract 

Source
pub const fn subtract(left: u64, right: u64) -> u64
Expand description

Subtracts one number from another.

§Examples

use certeza::subtract;

assert_eq!(subtract(4, 2), 2);
assert_eq!(subtract(10, 5), 5);

§Panics

This function will panic if right > left due to unsigned integer underflow. Consider using checked arithmetic for production code.