title: Libgdx - min and max of a rotated Bounding Box
body: <p>I am running the simple code below:</p>
  
  <pre><code>BoundingBox bounds = new BoundingBox();
  Vector3 vmin = new Vector3();
  Vector3 vmax = new Vector3();
  
  vmin.x = -1;
  vmin.y = -2;
  vmin.z = 0;  
  vmax.x = 1;
  vmax.y = 2;
  vmax.z = 0;
  bounds.set(vmin,vmax);
  
  Matrix4 mrot = new Matrix4();
  mrot.setToRotation(0, 0, 1, 90);
  bounds.mul(mrot);
  
  Gdx.app.log("xxx","minx " + bounds.min.x);
  Gdx.app.log("xxx","maxx " + bounds.max.x);
  Gdx.app.log("xxx","miny " + bounds.min.y);
  Gdx.app.log("xxx","maxy " + bounds.max.y);
  Gdx.app.log("xxx","dimx " + bounds.getWidth());
  Gdx.app.log("xxx","dimy " + bounds.getHeight());
  </code></pre>
  
  <p>Log shows:</p>
  
  <p>minx -2.0   // ok, as expected <br> 
  maxx 2.0    // ok, as expected <br>
  miny -2.0   // I would expect -1 ! <br>
  maxy 2.0    // I would expect 1 ! <br>
  dimx 4.0    // ok, as expected <br>
  dimy 4.0    // I would expect 2 ! <br></p>
  
  <p>My understanding would that the code above should simply rotate a 2D rectangle of 90° around the Z-axis. Results from the Log show that it is not the case (i.e. no change to the y coordinates)</p>
  
  <p>Does anyone can help me understand where I am mistaken?
  Many thanks</p>