avoid 'clamp' function creation on every euler method calls