Fixed array out of bounds bug

Added index bound checking for AccelerateDecelerateInterpolator.