Utility function to check whether an object is a number that belongs to a given interval

.check_is_numeric_in_interval(
  user_input,
  parameter_name,
  interval_start,
  interval_end
)

Arguments

user_input

The variable to be tested

parameter_name

A string containing the name the tested parameter had in the initial function in which it was passed.

interval_start

Left-bound of the accepted interval

interval_end

Right-bound of the accepted interval

Value

TRUE if all tests were passed. Throws an error otherwise.