torchsig.utils.coordinate_system.is_within_range

torchsig.utils.coordinate_system.is_within_range(test_coord_x: float, rectangle_left_x: float, rectangle_right_x: float) bool[source]

Check if a coordinate lies within a closed interval on the x-axis.

Parameters:
  • test_coord_x (float) – The x-value to test.

  • rectangle_left_x (float) – Lower bound of the interval.

  • rectangle_right_x (float) – Upper bound of the interval.

Returns:

True if rectangle_left_x <= test_coord_x <= rectangle_right_x.

Return type:

bool