getScale static method

void getScale(
  1. Mat2D m,
  2. Vec2D s
)

Implementation

static void getScale(Mat2D m, Vec2D s) {
  double x = m[0];
  double y = m[1];
  s.x = x.sign * sqrt(x * x + y * y);

  x = m[2];
  y = m[3];
  s.y = y.sign * sqrt(x * x + y * y);
}