0
I need to calculate the average value of points around a given point in a wider field.
For this I have a function:
fn local_average((x,y):(i32,i32),n:i32,(width,height):(i32,i32),space:&[i32]) -> i32 {
let y_range = cmp::max(y-n,0-y)..cmp::min(y+n,height);
let x_range = cmp::max(x-n,0-x)....