The function returns 1 for input values between -1 and 2 (inclusive), and 0 otherwise.

