Clipping reduced implementation in C style(arrays)