docstr: Tests small_angles approximation by comparing to exact calculation.
docstr_tok: ["Tests","small_angles","approximation","by","comparing","to","exact","calculation","."]
code: def test_from_euler_with_small_angles_approximation_random(self):
      """Tests small_angles approximation by comparing to exact calculation."""
      # Only generate small angles. For a test tolerance of 1e-3, 0.17 was found
      # empirically to be the range where the small angle approximation works.
      random_euler_angles = (
          test_helpers.generate_random_test_euler_angles(
              min_angle=-0.17, max_angle=0.17, dimensions=1
          )
      )
  
      exact_matrix = rotation_matrix_2d.from_euler(random_euler_angles)
      approximate_matrix = (
          rotation_matrix_2d.from_euler_with_small_angles_approximation(
              random_euler_angles
          )
      )
  
      self.assertAllClose(exact_matrix, approximate_matrix, atol=1e-3)
  
imports: from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  from tensorflow_graphics.geometry.transformation import rotation_matrix_2d
  from tensorflow_graphics.geometry.transformation.tests import test_data
  from tensorflow_graphics.geometry.transformation.tests import test_helpers
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 9 for calling the RotationMatrix2dTest obj's underlying member method code with example usage: obj.test_from_euler_with_small_angles_approximation_random() without return types