[][src]Function simplecv::filter::border_interpolate

pub fn border_interpolate(
    p: i32,
    len: usize,
    border: BorderType
) -> Option<usize>

Compute the source location of the outside point.

This function is used by filter. For example, when the border type is Reflect,

use simplecv::filter::*;
let nx = border_interpolate(-2, 10, BorderType::Reflect).unwrap();
assert_eq!(nx, 2);

The function return None when border type is Constant.