test_class.declarator: verticalBlackBars = new float[] {
              //  X,      Y,     Z,     U,     V
              -1.00f, -0.75f, 0.00f, 0.00f, 0.00f,
              1.00f, -0.75f, 0.00f, 1.00f, 0.00f,
              -1.00f, 0.75f, 0.00f, 0.00f, 1.00f,
              1.00f, 0.75f, 0.00f, 1.00f, 1.00f,
      }
test_class.modifier: private final
test_class.original_string: private final float[] verticalBlackBars = new float[] {
              //  X,      Y,     Z,     U,     V
              -1.00f, -0.75f, 0.00f, 0.00f, 0.00f,
              1.00f, -0.75f, 0.00f, 1.00f, 0.00f,
              -1.00f, 0.75f, 0.00f, 0.00f, 1.00f,
              1.00f, 0.75f, 0.00f, 1.00f, 1.00f,
      };
test_class.type: float[]
test_class.var_name: verticalBlackBars
test_class.declarator: horizontalBlackBars = new float[] {
          //  X,      Y,     Z,     U,     V
          -0.75f, -1.00f, 0.00f, 0.00f, 0.00f,
          0.75f, -1.00f, 0.00f, 1.00f, 0.00f,
          -0.75f, 1.00f, 0.00f, 0.00f, 1.00f,
          0.75f, 1.00f, 0.00f, 1.00f, 1.00f,
      }
test_class.modifier: private final
test_class.original_string: private final float[] horizontalBlackBars = new float[] {
          //  X,      Y,     Z,     U,     V
          -0.75f, -1.00f, 0.00f, 0.00f, 0.00f,
          0.75f, -1.00f, 0.00f, 1.00f, 0.00f,
          -0.75f, 1.00f, 0.00f, 0.00f, 1.00f,
          0.75f, 1.00f, 0.00f, 1.00f, 1.00f,
      };
test_class.type: float[]
test_class.var_name: horizontalBlackBars
test_class.declarator: defaultData = new float[] {
          //  X,     Y,    Z,    U,     V
          -1.0f, -1.0f, 0.0f, 0.00f, 0.00f,
          1.0f, -1.0f, 0.0f, 1.00f, 0.00f,
          -1.0f, 1.0f, 0.0f, 0.00f, 1.00f,
          1.0f, 1.0f, 0.0f, 1.00f, 1.00f,
      }
test_class.modifier: private final
test_class.original_string: private final float[] defaultData = new float[] {
          //  X,     Y,    Z,    U,     V
          -1.0f, -1.0f, 0.0f, 0.00f, 0.00f,
          1.0f, -1.0f, 0.0f, 1.00f, 0.00f,
          -1.0f, 1.0f, 0.0f, 0.00f, 1.00f,
          1.0f, 1.0f, 0.0f, 1.00f, 1.00f,
      };
test_class.type: float[]
test_class.var_name: defaultData
test_class.declarator: verticalBlackBarsRotated90 = new float[] {
            //    X,     Y,  Z,   U,   V
              -1.0f,  1.0f, 0, 0.f, 0.f,
              -1.0f, -1.0f, 0, 1.f, 0.f,
               1.0f,  1.0f, 0, 0.f, 1.f,
               1.0f, -1.0f, 0, 1.f, 1.f,
      }
test_class.modifier: private final
test_class.original_string: private final float[] verticalBlackBarsRotated90 = new float[] {
            //    X,     Y,  Z,   U,   V
              -1.0f,  1.0f, 0, 0.f, 0.f,
              -1.0f, -1.0f, 0, 1.f, 0.f,
               1.0f,  1.0f, 0, 0.f, 1.f,
               1.0f, -1.0f, 0, 1.f, 1.f,
      };
test_class.type: float[]
test_class.var_name: verticalBlackBarsRotated90
test_class.declarator: verticalBlackBarsRotated90ArCorrected = new float[] {
              //    X,     Y,  Z,   U,   V
             -0.5f,  1.0f, 0, 0.f, 0.f,
             -0.5f, -1.0f, 0, 1.f, 0.f,
              0.5f,  1.0f, 0, 0.f, 1.f,
              0.5f, -1.0f, 0, 1.f, 1.f,
      }
test_class.modifier: private final
test_class.original_string: private final float[] verticalBlackBarsRotated90ArCorrected = new float[] {
              //    X,     Y,  Z,   U,   V
             -0.5f,  1.0f, 0, 0.f, 0.f,
             -0.5f, -1.0f, 0, 1.f, 0.f,
              0.5f,  1.0f, 0, 0.f, 1.f,
              0.5f, -1.0f, 0, 1.f, 1.f,
      };
test_class.type: float[]
test_class.var_name: verticalBlackBarsRotated90ArCorrected
test_class.file: domain/src/test/java/org/m4m/domain/pipeline/TriangleVerticesCalculatorTest.java
test_class.identifier: TriangleVerticesCalculatorTest
test_case.body: @Test
      public void testScaleHorizontallyThenVertically() {
          int inWidth = 10;
          int inheight = 5;
  
          int outWidth = 20;
          int outheight = 5;
  
          TriangleVerticesCalculator calculator = new TriangleVerticesCalculator();
          float scale [] = calculator.getScale_PreserveAspectFit(0, inWidth, inheight, outWidth, outheight);
          assertAlmostEqual(scale, new float[] {0.5f, 1f}, 1e-7);
  
          inWidth = 10;
          inheight = 5;
  
          outWidth = 5;
          outheight = 20;
  
          scale = calculator.getScale_PreserveAspectFit(0, inWidth, inheight, outWidth, outheight);
          assertAlmostEqual(scale, new float[] {1f, 0.125f}, 1e-7);
      }
test_case.class_method_signature: TriangleVerticesCalculatorTest.testScaleHorizontallyThenVertically()
test_case.full_signature: @Test public void testScaleHorizontallyThenVertically()
test_case.identifier: testScaleHorizontallyThenVertically
test_case.invocations: getScale_PreserveAspectFit assertAlmostEqual getScale_PreserveAspectFit assertAlmostEqual
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testScaleHorizontallyThenVertically()
focal_class.declarator: stride = 5
focal_class.modifier: static
focal_class.original_string: static int stride = 5;
focal_class.type: int
focal_class.var_name: stride
focal_class.declarator: triangleVerticesData
focal_class.modifier: private final
focal_class.original_string: private final float[] triangleVerticesData;
focal_class.type: float[]
focal_class.var_name: triangleVerticesData
focal_class.declarator: defaultTriangleVerticesData
focal_class.modifier: private final
focal_class.original_string: private final float[] defaultTriangleVerticesData ;
focal_class.type: float[]
focal_class.var_name: defaultTriangleVerticesData
focal_class.declarator: scale = {1, 1}
focal_class.modifier: private final
focal_class.original_string: private final float[] scale = {1, 1};
focal_class.type: float[]
focal_class.var_name: scale
focal_class.file: domain/src/main/java/org/m4m/domain/pipeline/TriangleVerticesCalculator.java
focal_class.identifier: TriangleVerticesCalculator
focal_class.class_method_signature: TriangleVerticesCalculator.TriangleVerticesCalculator()
focal_class.full_signature: public  TriangleVerticesCalculator()
focal_class.identifier: TriangleVerticesCalculator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  TriangleVerticesCalculator()
focal_class.class_method_signature: TriangleVerticesCalculator.TriangleVerticesCalculator(float[] triangleVerticesData)
focal_class.full_signature: public  TriangleVerticesCalculator(float[] triangleVerticesData)
focal_class.identifier: TriangleVerticesCalculator
focal_class.modifiers: public
focal_class.parameters: (float[] triangleVerticesData)
focal_class.signature:  TriangleVerticesCalculator(float[] triangleVerticesData)
focal_class.class_method_signature: TriangleVerticesCalculator.getScale_PreserveAspectFit(int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.full_signature: public float[] getScale_PreserveAspectFit(int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.identifier: getScale_PreserveAspectFit
focal_class.modifiers: public
focal_class.parameters: (int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.return: float[]
focal_class.signature: float[] getScale_PreserveAspectFit(int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.class_method_signature: TriangleVerticesCalculator.getScale_PreserveAspectCrop(int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.full_signature: public float[] getScale_PreserveAspectCrop(int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.identifier: getScale_PreserveAspectCrop
focal_class.modifiers: public
focal_class.parameters: (int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.return: float[]
focal_class.signature: float[] getScale_PreserveAspectCrop(int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.class_method_signature: TriangleVerticesCalculator.getAspectRatioVerticesData(int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.full_signature: public float[] getAspectRatioVerticesData(int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.identifier: getAspectRatioVerticesData
focal_class.modifiers: public
focal_class.parameters: (int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.return: float[]
focal_class.signature: float[] getAspectRatioVerticesData(int widthIn, int heightIn, int widthOut, int heightOut)
focal_class.class_method_signature: TriangleVerticesCalculator.getDefaultTriangleVerticesData()
focal_class.full_signature: public static float[] getDefaultTriangleVerticesData()
focal_class.identifier: getDefaultTriangleVerticesData
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: float[]
focal_class.signature: float[] getDefaultTriangleVerticesData()
focal_method.body: public float[] getScale_PreserveAspectFit(int angle, int widthIn, int heightIn, int widthOut, int heightOut) {
          scale[0] = scale[1] = 1;
          if (angle == 90 || angle == 270) {
              int cx = widthIn;
              widthIn = heightIn;
              heightIn = cx;
          }
  
          float aspectRatioIn = (float) widthIn / (float) heightIn;
          float heightOutCalculated = (float) widthOut / aspectRatioIn;
  
          if (heightOutCalculated < heightOut) {
              scale[1] = heightOutCalculated / heightOut;
          } else {
              scale[0] = heightOut * aspectRatioIn / widthOut;
          }
  
          return scale;
      }
focal_method.class_method_signature: TriangleVerticesCalculator.getScale_PreserveAspectFit(int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_method.full_signature: public float[] getScale_PreserveAspectFit(int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_method.identifier: getScale_PreserveAspectFit
focal_method.modifiers: public
focal_method.parameters: (int angle, int widthIn, int heightIn, int widthOut, int heightOut)
focal_method.return: float[]
focal_method.signature: float[] getScale_PreserveAspectFit(int angle, int widthIn, int heightIn, int widthOut, int heightOut)