content: package androidx.constraintlayout.core.motion.utils;
  
  public class VelocityMatrix {
      private static String TAG = "VelocityMatrix";
      float mDRotate;
      float mDScaleX;
      float mDScaleY;
      float mDTranslateX;
      float mDTranslateY;
      float mRotate;
  
      public void applyTransform(float locationX, float locationY, int width, int height, float[] mAnchorDpDt) {
          int i = width;
          int i2 = height;
          float f = mAnchorDpDt[0];
          float f2 = mAnchorDpDt[1];
          float f3 = (locationX - 0.5f) * 2.0f;
          float f4 = (locationY - 0.5f) * 2.0f;
          float f5 = f + this.mDTranslateX;
          float f6 = f2 + this.mDTranslateY;
          float f7 = f5 + (this.mDScaleX * f3);
          float f8 = f6 + (this.mDScaleY * f4);
          float radians = (float) Math.toRadians((double) this.mRotate);
          float radians2 = (float) Math.toRadians((double) this.mDRotate);
          mAnchorDpDt[0] = f7 + (((float) ((((double) (((float) (-i)) * f3)) * Math.sin((double) radians)) - (((double) (((float) i2) * f4)) * Math.cos((double) radians)))) * radians2);
          mAnchorDpDt[1] = f8 + (((float) ((((double) (((float) i) * f3)) * Math.cos((double) radians)) - (((double) (((float) i2) * f4)) * Math.sin((double) radians)))) * radians2);
      }
  
      public void clear() {
          this.mDRotate = 0.0f;
          this.mDTranslateY = 0.0f;
          this.mDTranslateX = 0.0f;
          this.mDScaleY = 0.0f;
          this.mDScaleX = 0.0f;
      }
  
      public void setRotationVelocity(KeyCycleOscillator osc_r, float position) {
          if (osc_r != null) {
              this.mDRotate = osc_r.getSlope(position);
          }
      }
  
      public void setRotationVelocity(SplineSet rot, float position) {
          if (rot != null) {
              this.mDRotate = rot.getSlope(position);
              this.mRotate = rot.get(position);
          }
      }
  
      public void setScaleVelocity(KeyCycleOscillator osc_sx, KeyCycleOscillator osc_sy, float position) {
          if (osc_sx != null) {
              this.mDScaleX = osc_sx.getSlope(position);
          }
          if (osc_sy != null) {
              this.mDScaleY = osc_sy.getSlope(position);
          }
      }
  
      public void setScaleVelocity(SplineSet scale_x, SplineSet scale_y, float position) {
          if (scale_x != null) {
              this.mDScaleX = scale_x.getSlope(position);
          }
          if (scale_y != null) {
              this.mDScaleY = scale_y.getSlope(position);
          }
      }
  
      public void setTranslationVelocity(KeyCycleOscillator osc_x, KeyCycleOscillator osc_y, float position) {
          if (osc_x != null) {
              this.mDTranslateX = osc_x.getSlope(position);
          }
          if (osc_y != null) {
              this.mDTranslateY = osc_y.getSlope(position);
          }
      }
  
      public void setTranslationVelocity(SplineSet trans_x, SplineSet trans_y, float position) {
          if (trans_x != null) {
              this.mDTranslateX = trans_x.getSlope(position);
          }
          if (trans_y != null) {
              this.mDTranslateY = trans_y.getSlope(position);
          }
      }
  }
  