[][src]Function nalgebra_glm::round

pub fn round<N: RealField, D: Dimension>(x: &TVec<N, D>) -> TVec<N, D> where
    DefaultAllocator: Alloc<N, D>, 

Component-wise rounding.

Values equal to 0.5 are rounded away from 0.0.

Examples:

let vec = glm::vec4(-1.5, 0.6, 1.5, -3.2);
assert_eq!(glm::vec4(-2.0, 1.0, 2.0, -3.0), glm::round(&vec));

See also: