class_docstr: Tests all the rotated bounding box related utilities.
class_docstr_tok: ["Tests","all","the","rotated","bounding","box","related","utilities","."]
docstr: Test rboxe inscribes the other with 45 degree angle.
docstr_tok: ["Test","rboxe","inscribes","the","other","with","45","degree","angle","."]
code: def test_intersect_rbox_edges_rotated_box(self):
      """Test rboxe inscribes the other with 45 degree angle."""
      rbox1 = jnp.array([1.0, 1.0, 1.0, 1.0, 0])
      rbox2 = jnp.array(
          [1.0, 1.0, jnp.sqrt(2), jnp.sqrt(2), 45.0 * np.pi / 180.0]
      )
      corners1 = box_utils.cxcywha_to_corners(rbox1)
      corners2 = box_utils.cxcywha_to_corners(rbox2)
      it_points = box_utils.intersect_rbox_edges(corners1, corners2)
      it_points = jnp.round(
          it_points[~jnp.any(jnp.isnan(it_points), -1)], decimals=4
      )
      it_points = sorted([(x, y) for x, y in np.array(it_points)])
      # Expect intersection at unrotated box vertices.
      expected_pts = sorted(
          [(1.5, 1.5), (1.5, 0.5), (0.5, 0.5), (0.5, 1.5)] * 2
      )
      self.assertSequenceEqual(it_points, expected_pts)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  import jax.numpy
  import numpy
  from scenic.model_lib.base_models import box_utils
  from shapely import geometry
label_desc: Use image node_id 6 for calling the RBoxUtilsTest obj's underlying member method code with example usage: obj.test_intersect_rbox_edges_rotated_box() without return types