Function round

Source
pub fn round<T, const D: usize>(
    x: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>,
) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
where T: RealNumber,
Expand description

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: