Function openrr_planner::modify_to_nearest_angle[][src]

pub fn modify_to_nearest_angle<T>(
    vec1: &[T],
    vec2: &mut [T],
    limits: &Vec<Option<Range<T>>>
) where
    T: RealField, 
Expand description

If the joint has no limit, select the nearest value from (x + 2pi *).

let mut a = vec![0.1f64, 10.0];
let limits = vec![Some(k::joint::Range::new(0.0, 0.2)), None];
openrr_planner::modify_to_nearest_angle(&vec![1.0, 0.5], &mut a, &limits);
assert_eq!(a[0], 0.1, "no change");
assert!((a[1] - 3.716814).abs() < 0.000001);