Function glm::builtin::usubBorrow
[−]
[src]
pub fn usubBorrow<T: GenUType>(x: T, y: T) -> (T, T)
Subtracts the 32-bit unsigned integer y
from x
, returning the
difference and the borrow bit.
Returns the difference if it is non-negative, or 232 plus the difference otherwise.
The borrow bit is set to 0
ifx ≥ y
, or to 1
otherwise.
Example
use glm::{ usubBorrow, uvec2 }; let uv1 = uvec2(16, 17); let uv2 = uvec2(17, 16); assert_eq!(usubBorrow(uv1, uv2), (uvec2(0xFFFFFFFE, 1), uvec2(1, 0)));