@Override public double cos(int step){
  step=Math.abs(step) % steps;
  if (step < costable.length) {
    return costable[step];
  }
  if (step > halfsteps) {
    step=steps - step;
    if (step < costable.length) {
      return costable[step];
    }
  }
  step=halfsteps - step;
  return -costable[step];
}

@ Override public double cos ( int step ) { step = Math . abs ( step ) % steps ; if ( step < costable . length ) { return costable [ step ] ; } if ( step > halfsteps ) { step = steps - step ; if ( step < costable . length ) { return costable [ step ] ; } } step = halfsteps - step ; return - costable [ step ] ; }
get cosine by step value .
